Created
December 17, 2020 11:30
deploy on change thread
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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