import os if os.environ.get('WORKER_CLASS') in ('greenlet', 'gevent'): print 'Monkey-patching for gevent.' from gevent import monkey monkey.patch_all() from config import huey from tasks import count_beans if __name__ == '__main__': beans = raw_input('How many beans? ') count_beans(int(beans)) print('Enqueued job to count %s beans' % beans)
__author__ = 'mertsalik' from config import huey from tasks import count_beans if __name__ == "__main__": beans = raw_input("How many beans? \n") count_beans(beans) print 'Enqueued job to count %s beans' % beans
# coding=utf-8 from config import h from tasks import count_beans if __name__ == '__main__': count_beans(20)
from config import huey from tasks import count_beans if __name__ == "__main__": beans = 3 # raw_input('How many beans? ') count_beans(int(beans)) print("Enqueued job to count %s beans" % beans)
from config import huey from tasks import count_beans if __name__ == '__main__': count_beans(100) print("Count 100")
__author__ = 'mertsalik' from config import huey from tasks import count_beans if __name__ == "__main__": beans = raw_input("How many beans? \n") res = count_beans(beans) print res print res.get() # will output None print res.get(blocking=True) # will output Counted blabla beans