示例#1
0
文件: main.py 项目: 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)
示例#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
示例#3
0
文件: main.py 项目: Caratpine/study
# coding=utf-8

from config import h
from tasks import count_beans

if __name__ == '__main__':
    count_beans(20)
示例#4
0
文件: main.py 项目: 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)
示例#5
0
from config import huey
from tasks import count_beans

if __name__ == '__main__':
    count_beans(100)
    print("Count 100")
示例#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