mirror of https://github.com/jumpserver/jumpserver
[Update] 默认开启定时检测,运行失败默认log为warn
parent
2e8f5919a8
commit
8b63961d4d
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue