Renames async/enqueue to async_task.

This commit is contained in:
Ilan Steemers
2018-08-01 15:20:34 +02:00
parent 887870bcdb
commit acebdaa850
17 changed files with 154 additions and 154 deletions
+4 -4
View File
@@ -407,7 +407,7 @@ def save_task(task, broker):
return
# enqueues next in a chain
if task.get('chain', None):
tasks.enqueue_chain(task['chain'], group=task['group'], cached=task['cached'], sync=task['sync'], broker=broker)
tasks.async_chain(task['chain'], group=task['group'], cached=task['cached'], sync=task['sync'], broker=broker)
# SAVE LIMIT > 0: Prune database, SAVE_LIMIT 0: No pruning
db.close_old_connections()
try:
@@ -473,9 +473,9 @@ def save_cached(task, broker):
# save the group list
group_list.append(task_key)
broker.cache.set(group_key, group_list, timeout)
# enqueue next in a chain
# async_task next in a chain
if task.get('chain', None):
tasks.enqueue_chain(task['chain'], group=group, cached=task['cached'], sync=task['sync'], broker=broker)
tasks.async_chain(task['chain'], group=group, cached=task['cached'], sync=task['sync'], broker=broker)
# save the task
broker.cache.set(task_key,
SignedPackage.dumps(task),
@@ -536,7 +536,7 @@ def scheduler(broker=None):
q_options['broker'] = broker
q_options['group'] = q_options.get('group', s.name or s.id)
kwargs['q_options'] = q_options
s.task = tasks.enqueue(s.func, *args, **kwargs)
s.task = tasks.async_task(s.func, *args, **kwargs)
# log it
if not s.task:
logger.error(