mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2025-01-19 09:45:28 +01:00
Remove depreciated scheduler from tasks
This commit is contained in:
parent
79e33cd295
commit
3acc89c0eb
@ -251,17 +251,16 @@ class TasksManager:
|
|||||||
|
|
||||||
# one for now,
|
# one for now,
|
||||||
self.controller.stats.record_stats()
|
self.controller.stats.record_stats()
|
||||||
|
|
||||||
# one for later
|
# one for later
|
||||||
schedule.every(stats_update_frequency).seconds.do(self.controller.stats.record_stats).tag('stats-recording')
|
self.scheduler.add_job(self.controller.stats.record_stats, 'interval', seconds=stats_update_frequency, id="stats")
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def serverjar_cache_refresher():
|
def serverjar_cache_refresher(self):
|
||||||
logger.info("Refreshing serverjars.com cache on start")
|
logger.info("Refreshing serverjars.com cache on start")
|
||||||
server_jar_obj.refresh_cache()
|
server_jar_obj.refresh_cache()
|
||||||
|
|
||||||
logger.info("Scheduling Serverjars.com cache refresh service every 12 hours")
|
logger.info("Scheduling Serverjars.com cache refresh service every 12 hours")
|
||||||
schedule.every(12).hours.do(server_jar_obj.refresh_cache).tag('serverjars')
|
self.scheduler.add_job(server_jar_obj.refresh_cache, 'interval', hours=12, id="serverjars")
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def realtime():
|
def realtime():
|
||||||
@ -293,5 +292,5 @@ class TasksManager:
|
|||||||
|
|
||||||
def log_watcher(self):
|
def log_watcher(self):
|
||||||
self.controller.servers.check_for_old_logs()
|
self.controller.servers.check_for_old_logs()
|
||||||
schedule.every(6).hours.do(lambda: self.controller.servers.check_for_old_logs()).tag('log-mgmt')
|
self.scheduler.add_job(self.controller.servers.check_for_old_logs, 'interval', hours=6, id="log-mgmt")
|
||||||
|
|
||||||
|
@ -43,12 +43,12 @@
|
|||||||
<table class="table table-hover" width="100%" style="table-layout:fixed;">
|
<table class="table table-hover" width="100%" style="table-layout:fixed;">
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="rounded">
|
<tr class="rounded">
|
||||||
<th style="width: 25%;">Action</th>
|
<th style="width: 25%; min-width: 50px;">Action</th>
|
||||||
<th style="max-width: 40%;">Command</th>
|
<th style="max-width: 40%; min-width: 50px;">Command</th>
|
||||||
<th style="width: 10%;">Interval</th>
|
<th style="width: 10%; min-width: 50px;">Interval</th>
|
||||||
<th style="width: 10%;">Start Time</th>
|
<th style="width: 10%; min-width: 50px;">Start Time</th>
|
||||||
<th style="width: 10%;">Enabled</th>
|
<th style="width: 10%; min-width: 50px;">Enabled</th>
|
||||||
<th style="width: 10%;">Edit</th>
|
<th style="width: 10%; min-width: 50px;">Edit</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user