Merge lp://staging/~elachuni/ubuntu-webcatalog/celery into lp://staging/ubuntu-webcatalog
Status: | Merged |
---|---|
Approved by: | Anthony Lenton |
Approved revision: | 157 |
Merged at revision: | 156 |
Proposed branch: | lp://staging/~elachuni/ubuntu-webcatalog/celery |
Merge into: | lp://staging/ubuntu-webcatalog |
Diff against target: |
1262 lines (+551/-136) 35 files modified
django_project/config/main.cfg (+10/-1) django_project/settings.py (+4/-1) setup.py (+2/-0) src/webcatalog/admin.py (+2/-4) src/webcatalog/decorators.py (+32/-0) src/webcatalog/department_filters.py (+1/-4) src/webcatalog/forms.py (+1/-4) src/webcatalog/management/commands/cleanup.py (+24/-16) src/webcatalog/management/commands/import_all_app_install_data.py (+3/-5) src/webcatalog/management/commands/import_all_ratings_stats.py (+3/-5) src/webcatalog/management/commands/import_app_install_data.py (+1/-4) src/webcatalog/management/commands/import_sca_apps.py (+1/-4) src/webcatalog/managers.py (+1/-5) src/webcatalog/models/applications.py (+25/-5) src/webcatalog/preflight.py (+1/-4) src/webcatalog/schema.py (+11/-0) src/webcatalog/static/css/webcatalog.css (+1/-1) src/webcatalog/tasks.py (+54/-0) src/webcatalog/templates/forbidden.html (+23/-0) src/webcatalog/templates/webcatalog/task_list.html (+84/-0) src/webcatalog/templatetags/webcatalog.py (+1/-4) src/webcatalog/tests/__init__.py (+1/-0) src/webcatalog/tests/factory.py (+27/-6) src/webcatalog/tests/helpers.py (+1/-4) src/webcatalog/tests/test_commands.py (+4/-6) src/webcatalog/tests/test_department_filters.py (+1/-5) src/webcatalog/tests/test_forms.py (+1/-4) src/webcatalog/tests/test_managers.py (+1/-4) src/webcatalog/tests/test_models.py (+1/-4) src/webcatalog/tests/test_preflight.py (+3/-16) src/webcatalog/tests/test_tasks.py (+42/-0) src/webcatalog/tests/test_templatetags.py (+1/-5) src/webcatalog/tests/test_views.py (+116/-4) src/webcatalog/urls.py (+6/-4) src/webcatalog/views.py (+61/-7) |
To merge this branch: | bzr merge lp://staging/~elachuni/ubuntu-webcatalog/celery |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Danny Tamez (community) | Approve | ||
Review via email: mp+112398@code.staging.launchpad.net |
Commit message
Added a view to schedule asynchronous tasks via Celery.
Description of the change
Overview
========
This branch adds a view to schedule asynchronous tasks via Celery. Only one basic task is provided to import exhibits (plus one that always fails, for testing), the full set of tasks will be in a separate MP, now that the groundwork is in place. A brief video demo can be found on http://
Details
=======
The current branch counts on using CELERY_
The TaskMeta model was registered in the admin so that results can be browsed and searched in the admin UI after a task has run. The ModelAdmin class was improved a bit after grabbing the video, you can see the final list view on http://
The list of tasks available is put together by introspecting webcatalog.tasks, so adding new tasks available will be picked up and added automatically.
The task list template uses YUI.io to retrieve the task's status, but submits a POST form and reloads the whole page when you schedule a new task; I considered doing everything with ajax, but POST via ajax is a bit tricky, specially when csrf tokens are involved, so I went for this simpler solution that seems to be responsive enough.
30 -openid_ launchpad_ staff_teams = canonical- ca-hackers launchpad_ staff_teams = canonical- isd-hackers
31 +openid_
That looks backwards?
332 + if (message. hasClass( 'success' )) {
That looks as if it will loop forever on successful tasks?
Most of this branch looks pretty good to me.
Thanks,
James