зеркало из https://github.com/mozilla/inferno.git
add last_commit file for monitoring when a rule last completed
This commit is contained in:
Родитель
32c2c002f0
Коммит
81b39ad5ce
|
@ -63,6 +63,7 @@ def run_rule_async(rule_name, settings):
|
|||
if rule.retry:
|
||||
# Failed before, however, ran successfully this time. Clean up fail/retry files
|
||||
pid.clean_up(pid_dir, rule)
|
||||
pid.create_last_complete(pid_dir, rule)
|
||||
finally:
|
||||
pid.remove_pid(pid_dir, rule)
|
||||
os._exit(0)
|
||||
|
|
|
@ -38,6 +38,10 @@ def should_run(pid_dir, rule):
|
|||
return False
|
||||
|
||||
|
||||
def create_last_complete(pid_dir, rule):
|
||||
Datefile(pid_dir, "%s.last_complete" % rule.name, timestamp=datetime.utcnow())
|
||||
|
||||
|
||||
def create_last_run(pid_dir, rule):
|
||||
Datefile(pid_dir, "%s.last_run" % rule.name, timestamp=datetime.utcnow())
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче