Skip to content

Commit

Permalink
Replace .sls
Browse files Browse the repository at this point in the history
  • Loading branch information
yueyongyue authored Feb 16, 2020
1 parent 2f54cab commit 1f84cb1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tasks/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def grouping(concurrent, period_result, period_id, minion_list, salt_api, user,
if period_result.get("execute") == "shell":
result = salt_api.shell_remote_execution(minion, period_result.get("shell"))
elif period_result.get("execute") == "sls":
result = salt_api.target_deploy(minion, period_result.get("sls"))
result = salt_api.target_deploy(minion, period_result.get("sls").replace(".sls", ""))
# 执行结果写入到period_result表
results = {
"time": int(time.time()),
Expand Down Expand Up @@ -287,4 +287,4 @@ def insert_period_audit(period_id, period_audits):
status, result = db.insert("period_audit", json.dumps(results, ensure_ascii=False))
if status is False:
db.close_mysql()
logger.error("Insert period audit error: %s" % result)
logger.error("Insert period audit error: %s" % result)

0 comments on commit 1f84cb1

Please sign in to comment.