def run(args):
if not os.path.exists(SNAPSHOTS_PATH):
log.info('Creating %s', SNAPSHOTS_PATH)
os.makedirs(SNAPSHOTS_PATH, exist_ok=True)
# run a thread for the scheduled snapshots
print('Starting scheduler job every {}s'.format(TIMER))
Timer(1, scheduler).start()
# listen to requests
serve(app, unix_socket=SOCKET, unix_socket_perms='660')
评论列表
文章目录