stop task immediately it is marked finished
This commit is contained in:
parent
288bc9520f
commit
7a088d2a62
1 changed files with 4 additions and 0 deletions
|
@ -298,6 +298,10 @@ def sync_doufen_job(task, stop_check_func):
|
|||
"""
|
||||
TODO: Update task status every certain amount of items to reduce IO consumption
|
||||
"""
|
||||
task = SyncTask.objects.get(pk=task.pk)
|
||||
if task.is_finished:
|
||||
return
|
||||
|
||||
parser = DoufenParser(task)
|
||||
items = parser.parse()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue