Skip to content

Commit

Permalink
fix: 修改业务数据为1时同步进程报错 (closed TencentBlueKing#361)
Browse files Browse the repository at this point in the history
  • Loading branch information
wyyalt committed Aug 8, 2024
1 parent 1f1a787 commit 1e69c0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/gsekit/periodic_tasks/sync_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def sync_process(bk_biz_id=None):
count = len(bk_biz_id_list)
for index, biz_id in enumerate(bk_biz_id_list):
logger.info(f"[sync_process] start, bk_biz_id={biz_id}")
countdown = calculate_countdown(count, index)
countdown = calculate_countdown(count, index) if count > 1 else 0
sync_biz_process_task.apply_async((biz_id,), countdown=countdown)
logger.info(f"[sync_process] bk_biz_id={biz_id} will be run after {countdown} seconds.")

Expand Down

0 comments on commit 1e69c0c

Please sign in to comment.