Example #1
0
File: main.py Project: WPH95/huey
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)
Example #2
0
__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
Example #3
0
# coding=utf-8

from config import h
from tasks import count_beans

if __name__ == '__main__':
    count_beans(20)
Example #4
0
File: main.py Project: majj/huey
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)
Example #5
0
from config import huey
from tasks import count_beans

if __name__ == '__main__':
    count_beans(100)
    print("Count 100")
Example #6
0
__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