Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
deploy on change thread
def deploy_service_on_change():
while True:
if EventHandler.last_update_time and (int(time.time() - EventHandler.last_update_time) > DEPLOY_AFTER_CHANGE_SEC):
EventHandler.last_update_time = None
deploy_env()
time.sleep(5)
def start_interval_watcher_thread():
interval_watcher_thread = threading.Thread(target=deploy_service_on_change)
interval_watcher_thread.start()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment