mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Add cleanup method for server stats on delete
This commit is contained in:
parent
0f19c0c787
commit
e161e2cf0b
@ -841,6 +841,7 @@ class Controller:
|
||||
|
||||
# Cleanup scheduled tasks
|
||||
try:
|
||||
srv_obj.remove_stats_job()
|
||||
HelpersManagement.delete_scheduled_task_by_server(server_id)
|
||||
except DoesNotExist:
|
||||
logger.info("No scheduled jobs exist. Continuing.")
|
||||
|
@ -504,6 +504,9 @@ class Server:
|
||||
f"Assuming it was never started."
|
||||
)
|
||||
|
||||
def remove_stats_job(self):
|
||||
self.server_scheduler.remove_job("stats_" + str(self.server_id))
|
||||
|
||||
def start_crash_detection(self):
|
||||
# This is only used if the crash detection settings change
|
||||
# while the server is running.
|
||||
|
Loading…
Reference in New Issue
Block a user