Skip to content

Commit 2f91f75

Browse files
author
沈硕
committed
Merge branch 'dev_ldd' into 'main'
fix(自动发现):任务传入accout_id See merge request codo/codo-cmdb!102
2 parents b3cec0e + 97a3fe3 commit 2f91f75

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

cmdb/handlers/cloud_handler.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ def add_cloud_jobs():
105105
if not func_name: continue
106106
scheduler.add_job(
107107
func_name, 'interval', minutes=item.get('interval', 30),
108-
replace_existing=True, id=item.get('account_id'), name=str(item)
108+
replace_existing=True, id=item.get('account_id'), name=str(item),
109+
kwargs=dict(account_id=item['account_id'])
109110
) # 默认 30m
110111

111112

libs/volc/synchronize.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ def index():
8989
executor.map(
9090
sync, sync_mapping.values()
9191
)
92+
index()
9293

9394
if __name__ == '__main__':
9495
pass

0 commit comments

Comments
 (0)