mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Fix for tzdata
This commit is contained in:
parent
a124ab24e2
commit
c736c2eec1
@ -14,7 +14,7 @@ import zlib
|
|||||||
import html
|
import html
|
||||||
import apscheduler
|
import apscheduler
|
||||||
from apscheduler.schedulers.background import BackgroundScheduler
|
from apscheduler.schedulers.background import BackgroundScheduler
|
||||||
import tzlocal
|
from tzlocal import get_localzone
|
||||||
|
|
||||||
|
|
||||||
from app.classes.shared.helpers import helper
|
from app.classes.shared.helpers import helper
|
||||||
@ -143,7 +143,8 @@ class Server:
|
|||||||
logger.info("Scheduling server {} to start in {} seconds".format(self.name, delay))
|
logger.info("Scheduling server {} to start in {} seconds".format(self.name, delay))
|
||||||
console.info("Scheduling server {} to start in {} seconds".format(self.name, delay))
|
console.info("Scheduling server {} to start in {} seconds".format(self.name, delay))
|
||||||
|
|
||||||
self.server_scheduler = BackgroundScheduler(timezone=str(tzlocal.get_localzone()))
|
tz = get_localzone()
|
||||||
|
self.server_scheduler = BackgroundScheduler(timezone=str(tz))
|
||||||
self.server_scheduler.add_job(self.run_scheduled_server, 'interval', seconds=delay, id=str(self.server_id))
|
self.server_scheduler.add_job(self.run_scheduled_server, 'interval', seconds=delay, id=str(self.server_id))
|
||||||
self.server_scheduler.start()
|
self.server_scheduler.start()
|
||||||
|
|
||||||
|
@ -7,9 +7,8 @@ import logging
|
|||||||
import threading
|
import threading
|
||||||
import asyncio
|
import asyncio
|
||||||
import shutil
|
import shutil
|
||||||
import tzlocal
|
from tzlocal import get_localzone
|
||||||
|
|
||||||
from pytz import HOUR, timezone
|
|
||||||
from app.classes.controllers.users_controller import Users_Controller
|
from app.classes.controllers.users_controller import Users_Controller
|
||||||
|
|
||||||
from app.classes.shared.helpers import helper
|
from app.classes.shared.helpers import helper
|
||||||
@ -52,7 +51,8 @@ class TasksManager:
|
|||||||
self.controller = controller
|
self.controller = controller
|
||||||
self.tornado = Webserver(controller, self)
|
self.tornado = Webserver(controller, self)
|
||||||
|
|
||||||
self.scheduler = BackgroundScheduler(timezone=str(tzlocal.get_localzone()))
|
tz = get_localzone()
|
||||||
|
self.scheduler = BackgroundScheduler(timezone=str(tz))
|
||||||
|
|
||||||
self.users_controller = Users_Controller()
|
self.users_controller = Users_Controller()
|
||||||
|
|
||||||
|
4
main.py
4
main.py
@ -140,8 +140,8 @@ if __name__ == '__main__':
|
|||||||
# refresh our cache and schedule for every 12 hoursour cache refresh for serverjars.com
|
# refresh our cache and schedule for every 12 hoursour cache refresh for serverjars.com
|
||||||
tasks_manager.serverjar_cache_refresher()
|
tasks_manager.serverjar_cache_refresher()
|
||||||
|
|
||||||
logger.info("Checking Internet/Port Service. This may take a minute.")
|
logger.info("Checking Internet. This may take a minute.")
|
||||||
console.info("Checking Internet/Port Service. This may take a minute.")
|
console.info("Checking Internet. This may take a minute.")
|
||||||
|
|
||||||
if not helper.check_internet():
|
if not helper.check_internet():
|
||||||
console.warning("We have detected the machine running Crafty has no connection to the internet. Client connections to the server may be limited.")
|
console.warning("We have detected the machine running Crafty has no connection to the internet. Client connections to the server may be limited.")
|
||||||
|
@ -15,6 +15,4 @@ tornado~=6.0
|
|||||||
cached_property==1.5.2
|
cached_property==1.5.2
|
||||||
apscheduler~=3.8.1
|
apscheduler~=3.8.1
|
||||||
cron-validator~=1.0.3
|
cron-validator~=1.0.3
|
||||||
tzlocal~=4.1
|
tzlocal~=4.1
|
||||||
pytz
|
|
||||||
tzdata~=2021.5
|
|
Loading…
Reference in New Issue
Block a user