rename core_sync_period

This commit is contained in:
deflax 2024-01-18 01:50:48 +02:00
parent 83848f6685
commit b62411f89d

View file

@ -22,7 +22,7 @@ logger_api.setLevel(log_level)
logger_job.setLevel(log_level) logger_job.setLevel(log_level)
# Variables # Variables
CORE_SYNC_PERIOD = int(os.environ.get('CORE_SYNC_PERIOD', 15)) core_sync_period = int(os.environ.get('CORE_SYNC_PERIOD', 15))
api_hostname = os.environ.get('CORE_API_HOSTNAME', 'stream.example.com') api_hostname = os.environ.get('CORE_API_HOSTNAME', 'stream.example.com')
api_username = os.environ.get('CORE_API_AUTH_USERNAME', 'admin') api_username = os.environ.get('CORE_API_AUTH_USERNAME', 'admin')
api_password = os.environ.get('CORE_API_AUTH_PASSWORD', 'pass') api_password = os.environ.get('CORE_API_AUTH_PASSWORD', 'pass')
@ -282,7 +282,7 @@ except Exception as err:
#sys.exit(1) #sys.exit(1)
# Schedule sync jobs # Schedule sync jobs
scheduler.add_job(func=core_api_sync, trigger='interval', seconds=CORE_SYNC_PERIOD, id='core_api_sync') scheduler.add_job(func=core_api_sync, trigger='interval', seconds=core_sync_period, id='core_api_sync')
scheduler.get_job('core_api_sync').modify(next_run_time=datetime.now()) scheduler.get_job('core_api_sync').modify(next_run_time=datetime.now())
# Start the scheduler # Start the scheduler