Fix for tzdata

This commit is contained in:
Andrew 2022-01-14 14:59:06 -05:00
parent a124ab24e2
commit c736c2eec1
4 changed files with 9 additions and 10 deletions

View File

@ -14,7 +14,7 @@ import zlib
import html
import apscheduler
from apscheduler.schedulers.background import BackgroundScheduler
import tzlocal
from tzlocal import get_localzone
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))
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.start()

View File

@ -7,9 +7,8 @@ import logging
import threading
import asyncio
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.shared.helpers import helper
@ -52,7 +51,8 @@ class TasksManager:
self.controller = controller
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()

View File

@ -140,8 +140,8 @@ if __name__ == '__main__':
# refresh our cache and schedule for every 12 hoursour cache refresh for serverjars.com
tasks_manager.serverjar_cache_refresher()
logger.info("Checking Internet/Port Service. This may take a minute.")
console.info("Checking Internet/Port Service. This may take a minute.")
logger.info("Checking Internet. This may take a minute.")
console.info("Checking Internet. This may take a minute.")
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.")

View File

@ -15,6 +15,4 @@ tornado~=6.0
cached_property==1.5.2
apscheduler~=3.8.1
cron-validator~=1.0.3
tzlocal~=4.1
pytz
tzdata~=2021.5
tzlocal~=4.1