I can give more details but I need to know what ::p
frgtn joined the channel
frgtn has quit
frgtn joined the channel
LittleEndian joined the channel
georgeirwin joined the channel
vishesh has quit
ionelmc
hr: any traceback ?
hr
very short and not helpful to me
georgeirwin has quit
In [65]: result.traceback
Out[65]: u'Traceback (most recent call last):\n File "/home/stefan.berder/.virtualenvs/ledapei_web/local/lib/python2.7/site-packages/celery/backends/base.py", line 521, in on_chord_part_return\n culprit = next(deps._failed_join_report())\nStopIteration: TimeoutError(\'Operation timed out (3.0)\',)\n'
asksol
it means the results do not exist in the backend
fayaz_ has quit
maular
ok, I had to deal with something else for a bit. Back, and now looking into getting access to the "hub" or "timer" from my Consumer bootstep. The docs (http://docs.celeryproject.org/en/latest/usergui...) say that "Consumer" has a .hub, but "your bootstep must require the Hub bootstep to use this"
when I have "class BatchConsumerStep(bootsteps.ConsumerStep):\n requires = ('Hub', )" I get "ImportError: No module named Hub" from kombu/utils/__init__.py", line 91, in symbol_by_name
the bootsteps.ConsumerStep already has "requires = ('Connection', )", but if I replicate that in my own class, I get the same import error
I had a threading.Timer, and found this interfered with the signalling (ie the timer thread would need to wake, before the process would restart with SIG_HUP)
so ionelmc recommended I use the "hub" instead (similar to how the celery.contrib.batches.Batches does, although it's accessing a consumer.timer directly)
asksol
maular: I cannot see it says 'Connection' there?E
you must use the fqdn: 'celery.worker.consumer:Connection'
or import it and use requires = (Connection, )
you must not use threads in a worker when the event loop is used
maular
ahh, that could be it. Sorry no, the "requires = (Connection,)" is from the bootsteps.ConsumerStep source directly
asksol
the worker has a timer component for this purpose anyway
weird, that is wrong then, but it must have worked at some point
you can just override the attribute in your subclass though
consumer.timer.call_after(10.0, fun, *args)
I don't think you need to require the Hub in a consumer bootstep
hub is a worker component, and that is already fully started when consumer bootsteps are loaded
using consumer.hub means that it will not work when the threads-mode is used
using consumer.timer means it will work both in the event loop and with threads
Zac12 has left the channel
maular
I don't have consumer.timer... is that because my consumer is a kombu.Consumer?
asksol
yeah, not kombu.Consumer you need to celery.worker.consumer.Consumer object
need the*
maular
ok I'll use that... I have no desire for a kombu.Consumer, just following the example :)
asksol
ConsumerStep.start(consumer)
consumer is the object you want
i.e. the bootstep methods are called with the parent object as first argument
I have considered renaming celery.worker.consumer:Consumer but have not figured a better name
bmbouter joined the channel
ionelmc
asksol: Processor or WorkConsumer ?
bmbouter_ joined the channel
gp
With early acknowledgement, is the task lost if the worker crashes in the middle of execution?
maular
wait, I'm confused. If I subclass celery.bootsteps.ConsumerStep, I need to implement get_consumers. This should create a celery.worker.consumer.Consumer instance, which needs to be passed the Celery app, and a timer...
ionelmc
gp: yes
anuvrat has quit
gp
Is there any way to recover from that without using acks_late?
Going to give redis a go, but I need to avoid visiblity_timeout issues so I don't think I can use acks_late
vishesh joined the channel
avn
asksol: I have a question, I try to subclass Task, and override __call__, but super(MyTask, self).__call__() not works as expected (decorate Task.__call__ with monkeypatching not works too)
lduros joined the channel
maular
yeah, I'm stuck with this ConsumerStep... to be honest, looking at the celery.worker.consumer.Consumer source, it looks like I can just implement a custom "strategy" to handle the tasks (buffering without ack), and then I'm already in a consumer with a timer...?
BojanBG has quit
bkuberek joined the channel
gp has quit
Diranged has quit
gp joined the channel
gp
Is it possible to manually acknowledge tasks?
hr
asksol: how does it not exist in the backend?
any special reason for this happening?
and a timeout error doesn't seem so consistent with no data available...
LittleEndian has quit
ionelmc
gp: there was this question on irc in the past
asksol
hr: it must have been removed in the mean time
hr: .join waits for the results to be available, so time out is suitable
Will| has quit
hr has quit
hr joined the channel
carlio has quit
sgviking has quit
Will| joined the channel
teebes joined the channel
sgviking joined the channel
carlio joined the channel
hr
asksol: is that possible that it would happen in a group/chain?