layerindex-web/layerindex
Paul Eggleton d84bfd710d Allow stopping update task
For situations where the user launches a distro comparison update
process and then shortly afterwards realises it is operating with the
wrong configuration (or is otherwise broken) and is going to take a long
time to finish, add a button to the task page to stop the task. This was
tricky to get working, since the default behaviour of Celery's revoke()
would either terminate both the Celery task process along with the update
process (leaving us with no log saved to the database) or worse not even
kill the update process, depending on the signal sent. To avoid this,
send SIGUSR2, trap it in the task process and kill the child process,
returning gracefully. To make that possible I had to rewrite runcmd() to
use subprocess.Popen() instead of subprocess.check_call() as otherwise
we can't get the child's PID.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-09-20 16:04:49 +12:00
..
migrations Properly show update task success/failure 2018-09-20 16:04:49 +12:00
static Show update task output more smoothly 2018-09-20 16:04:49 +12:00
templatetags Show update task output more smoothly 2018-09-20 16:04:49 +12:00
tools Show progress when running comparison update tasks 2018-09-20 16:04:49 +12:00
__init__.py Initial commit of layerindex-web 2013-02-13 12:09:57 +00:00
admin.py Improve collection/display of LayerUpdate records 2018-08-14 15:07:34 +02:00
bulkchange.py bulkchange: make script more robust 2018-08-06 12:36:31 +02:00
context_processors.py Add support for other distro comparisons 2018-08-07 14:44:27 +02:00
forms.py Upgrade to Bootstrap 3 2018-09-20 15:57:59 +12:00
layerconfparse.py layerconfparse.py: remove unused layerbranch from parse_layer() 2017-07-21 08:14:57 +02:00
models.py Properly show update task success/failure 2018-09-20 16:04:49 +12:00
querysethelper.py Replace usage of model._meta.get_all_field_names() 2018-04-24 10:15:47 +12:00
recipedesc.py layerindex: Update tinfoil to call shutdown method 2017-01-11 21:56:35 +13:00
recipeparse.py recipeparse: don't error out on missing layer recommends 2018-07-09 13:50:15 +02:00
restperm.py expose REST API for layerindex 2014-09-24 11:32:34 +01:00
restviews.py restviews: add additional layer view with extra nested fields 2018-02-07 11:27:48 +13:00
simplesearch.py Improve recipe search 2013-02-19 17:22:45 +00:00
tasks.py Properly show update task success/failure 2018-09-20 16:04:49 +12:00
update_layer.py update: add option to stop immediately on parse errors 2018-08-24 16:41:59 +12:00
update.py Disable git interactive password prompts 2018-09-06 11:08:43 +12:00
urls_branch.py Add ability to trigger comparison updates manually from UI 2018-08-13 16:04:14 +02:00
urls.py Allow stopping update task 2018-09-20 16:04:49 +12:00
utils.py Allow stopping update task 2018-09-20 16:04:49 +12:00
views.py Allow stopping update task 2018-09-20 16:04:49 +12:00