mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Add final fixes for system user and automated backups
This commit is contained in:
parent
9ae0991f4b
commit
b4f247bb95
@ -74,11 +74,8 @@ class db_shortcuts:
|
||||
try:
|
||||
if query.count() > 0:
|
||||
for s in query:
|
||||
if s.user_id == 0:
|
||||
print(s.user_id)
|
||||
rows.append(model_to_dict(s))
|
||||
except Exception as e:
|
||||
print('QUERY: ', query)
|
||||
logger.warning("Database Error: {}".format(e))
|
||||
pass
|
||||
|
||||
|
@ -73,8 +73,9 @@ class TasksManager:
|
||||
logger.info("Loading schedule ID#{i}: '{a}' every {n} {t} at {s}".format(
|
||||
i=j.schedule_id, a=j.action, n=j.interval, t=j.interval_type, s=j.start_time))
|
||||
try:
|
||||
print(self.controller.users.get_id_by_name('system'))
|
||||
getattr(schedule.every(j.interval), j.interval_type).at(j.start_time).do(
|
||||
self.controller.management.send_command, 0, j.server_id, "127.27.23.89", j.action)
|
||||
self.controller.management.send_command, self.controller.users.get_id_by_name('system'), j.server_id, "127.27.23.89", j.action)
|
||||
except schedule.ScheduleValueError as e:
|
||||
logger.critical("Scheduler value error occurred: {} on ID#{}".format(e, j.schedule_id))
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user