Commit 8b63961d authored by ibuler's avatar ibuler

[Update] 默认开启定时检测,运行失败默认log为warn

parent 2e8f5919
......@@ -21,7 +21,7 @@ TIMEOUT = 60
logger = get_logger(__file__)
CACHE_MAX_TIME = 60*60*60
disk_pattern = re.compile(r'^hd|sd|xvd|vd')
PERIOD_TASK = os.environ.get("PERIOD_TASK", "off")
PERIOD_TASK = os.environ.get("PERIOD_TASK", "on")
@shared_task
......
......@@ -234,7 +234,7 @@ class AdHoc(models.Model):
result = runner.run(self.tasks, self.pattern, self.task.name)
return result.results_raw, result.results_summary
except AnsibleError as e:
logger.error("Failed run adhoc {}, {}".format(self.task.name, e))
logger.warn("Failed run adhoc {}, {}".format(self.task.name, e))
pass
@become.setter
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment