lssergey
2012-04-13 16:01:22 UTC
Hello,
I have tasks.py file:
from celery.task import task
from eventlet.green import urllib2
@task
def get_slow_response(delay):
print urllib2.urlopen('http://slowapi.herokuapp.com/delay/%s' %
delay).read()
I run Celery with '-P eventlet' option, enter next lines in python shell:
from celery.task import control
from tasks import get_slow_response
control.time_limit("tasks.get_slow_response", hard=5, reply=True)
get_slow_response.delay(10).wait()
and receive a response from slowapi.com in 10 seconds, although I expect
TimeLimitExceeded exception in 5 seconds.
Why Celery does not kill eventlet green thread when time limit is exceeded?
(If Celery is launched without eventlet, everything is fine, exception is
raised in 5 seconds.)
Thanks
I have tasks.py file:
from celery.task import task
from eventlet.green import urllib2
@task
def get_slow_response(delay):
print urllib2.urlopen('http://slowapi.herokuapp.com/delay/%s' %
delay).read()
I run Celery with '-P eventlet' option, enter next lines in python shell:
from celery.task import control
from tasks import get_slow_response
control.time_limit("tasks.get_slow_response", hard=5, reply=True)
get_slow_response.delay(10).wait()
and receive a response from slowapi.com in 10 seconds, although I expect
TimeLimitExceeded exception in 5 seconds.
Why Celery does not kill eventlet green thread when time limit is exceeded?
(If Celery is launched without eventlet, everything is fine, exception is
raised in 5 seconds.)
Thanks
--
You received this message because you are subscribed to the Google Groups "celery-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/celery-users/-/UHASdH9EnQgJ.
To post to this group, send email to celery-users-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to celery-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/celery-users?hl=en.
You received this message because you are subscribed to the Google Groups "celery-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/celery-users/-/UHASdH9EnQgJ.
To post to this group, send email to celery-users-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to celery-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/celery-users?hl=en.