Skip to content

v0.4.1

Compare
Choose a tag to compare
@Koed00 Koed00 released this 21 Jul 11:18
· 927 commits to master since this release
  • adds save override for tasks
  • adds optional q_options options dict instead of keywords

You can now instruct async() to override the global save settings for a particular task. This can be useful, for example , when you have a task that generates many sub-tasks , but you only want to see the main task in your result database. In that case you set ``save=False' when you async the sub-tasks.

For convenience, async() now also accepts all the option keywords as a single dict named q_options.
This has the benefit of freeing up keywords like 'save' , 'group' etc. and being a little tidier.
Note that when you use the ``q_options` dict, all other keywords arguments get passed on to the task function and are ignored as options.

opts = {'save': False, 'group': 'Indexer'}
async('tasks.index','www', q_options=opts)

This also enables schedules to use async options when you add the q_options dict to the schedule's keywords.