Skip to content

Commit

Permalink
feat(backend): 修复服务实例为 None 的情况 #8580
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangzhw8 authored and iSecloud committed Dec 12, 2024
1 parent 572d5e4 commit 5639fcb
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions dbm-ui/backend/flow/utils/cc_manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,13 +576,15 @@ def trigger_operate_collector(
trigger_time = time.time()
logger.error(f"trigger_operate_collector trigger_timer: {trigger_time}")
RedisConn.set(trigger_time_key, trigger_time, ex=OPERATE_COLLECTOR_COUNTDOWN)
RedisConn.lpush(cache_key, *bk_instance_ids)
operate_collector.apply_async(
kwargs={
"db_type": db_type,
"machine_type": machine_type,
"bk_instance_ids": bk_instance_ids,
"action": action,
},
countdown=OPERATE_COLLECTOR_COUNTDOWN,
)

if bk_instance_ids:
RedisConn.lpush(cache_key, *bk_instance_ids)
operate_collector.apply_async(
kwargs={
"db_type": db_type,
"machine_type": machine_type,
"bk_instance_ids": bk_instance_ids,
"action": action,
},
countdown=OPERATE_COLLECTOR_COUNTDOWN,
)

0 comments on commit 5639fcb

Please sign in to comment.