Skip to content

Instantly share code, notes, and snippets.

@MerleLiuKun
Created July 8, 2019 03:25
Show Gist options
  • Save MerleLiuKun/1f080bf1ce5462ec414e19a35c097820 to your computer and use it in GitHub Desktop.
Save MerleLiuKun/1f080bf1ce5462ec414e19a35c097820 to your computer and use it in GitHub Desktop.
celery run
comments = []
comment_tasks = []
# loop and add part one all tasks
for comment in comments:
comment_info = {
'id': comment.id,
'message': comment.message
}
comment_tasks.append(do_analyze.si(task_info, comment_info))
# 链式 Part one and Part two
chain(
group(*comment_tasks),
do_finish_task.si(task_id)
)()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment