Created
November 15, 2017 11:05
-
-
Save romank0/8fae4c710d5996918cd9b651d858ee6e to your computer and use it in GitHub Desktop.
long running task
This file contains hidden or 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
@task(routing_key="low_priority", queue="low_priority", acks_late=True) | |
def long_running(): | |
import os | |
from time import sleep | |
while not os.path.isfile('/Users/romanko/stop'): | |
logger.info('no file: waiting 5 seconds') | |
sleep(5) | |
logger.info('file exists: exiting') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment