Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def init_notifier(config):
db.init(config['db'])
global default_timezone
default_timezone = config['notifier'].get('default_timezone', 'US/Pacific')
if config['notifier']['skipsend']:
global send_message
send_message = blackhole
def main():
config = utils.read_config(sys.argv[1])
db.init(config['db'])
cycle_time = config.get('scheduler_cycle_time', 3600)
schedulers = {}
while 1:
connection = db.connect()
db_cursor = connection.cursor(db.DictCursor)
start = time.time()
# Load all schedulers
db_cursor.execute('SELECT name FROM scheduler')
schedulers = {}
for row in db_cursor:
try:
scheduler_name = row['name']
if scheduler_name not in schedulers: