Merge lp:~jml/libdep-service/celery-task into lp:libdep-service
Status: | Merged |
---|---|
Approved by: | James Westby |
Approved revision: | 80 |
Merged at revision: | 74 |
Proposed branch: | lp:~jml/libdep-service/celery-task |
Merge into: | lp:libdep-service |
Diff against target: |
260 lines (+153/-18) 8 files modified
django_project/dev.cfg (+16/-0) django_project/main.cfg (+1/-0) djlibdep/api.py (+16/-0) djlibdep/aptfile.py (+0/-18) djlibdep/tasks.py (+50/-0) djlibdep/tests/__init__.py (+1/-0) djlibdep/tests/test_api.py (+10/-0) djlibdep/tests/test_tasks.py (+59/-0) |
To merge this branch: | bzr merge lp:~jml/libdep-service/celery-task |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
James Westby (community) | Approve | ||
Review via email: mp+131968@code.launchpad.net |
Commit message
Add celery tasks for updating the database using Contents / apt-file
Description of the change
Adds kombu as an installed application, haven't added it as a dependency.
The change to insert_packages to protect against duplicate insertions means that we're going to be storing the whole thing in memory. I haven't tried catching the IntegrityError in this branch. My memory from past efforts shows that this doesn't work, as by the time you catch it the transaction has already been voided.
I just used subtask directly. I could also have used TaskSets, but don't really see what we'd win there. To my annoyance, celery duplicates something of Twisted but makes itself look simpler by merely not documenting how it actually works.
http://
Tests are fairly straightforward.
Thanks,
jml