View Single Post
Old 06-19-2011, 09:46 AM   #85
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,476
Karma: 8025702
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
The create job subsequence changes are in source.

These changes ensure that under certain conditions, follow-on jobs scheduled by a running job run before jobs scheduled in other ways. For example, two-step jobs like upload_books will run both steps before another job can be run.

The conditions are:
- The sub-job must be created while the creating job is running. In practice, this means that the sub-job must be created in the done function of the creating job.
- The done function of the sub-job must be encapsulated with FunctionDispatcher().

All the standard jobs in device.py respect these conditions.

If anyone has uses job sequences and wants to use this feature, call create_job_step passing in the job value. This is the first parameter passed to a done function. See books_uploaded, the done function for upload_books, for an example of scheduling upload_booklists as a sub-job.

@meme: could you try two things? 1) See if it still works with the code you have, and whether the job sequencing changes (according to the log). 2) Switch back to device_manager.books and check if it still works.

My strong suspicion is that both 1 and 2 will work. You can change it back to get_device_info for your production version.
chaley is offline   Reply With Quote