2010-2-22

08:25 asksol
padt: seen him around, some guy at IBM
08:25 asksol
or not seen, tweeted with :)
08:47 padt
aha
10:43 asksol
he had awesome slides at leat
12:43 asksol
12:43 asksol
you can now apply tasks without having the task class in registry
12:43 asksol
celery.execute.send_task
12:43 asksol
not sure about the name yet
12:44 asksol
send_task("celery.ping", args=[], kwargs={})
12:57 apollo13
asksol: show me the slides :)
13:06 asksol
I asked him if he could put it up on slideshare
13:06 asksol
guess I could share it on the mobileme disk
13:08 asksol
13:10 apollo13
yeah lol
13:10 apollo13
can't view it, need to find a way to rotate the pages :/
13:10 padt
ctrl-left in evince
13:11 padt
in case you're using stock ubuntu..
13:11 apollo13
jupp just found out
13:11 asksol
in os x preview it's Cmt+L
13:49 asksol
underseapilot: any new news on your evaluation of the new behaviour?
13:49 asksol
behavior
13:49 asksol
would be nice to do a bugfix release asap
13:59 underseapilot
asksol, i'm buried with other work atm, i might get back to it tomorrow. mostly seems good, but still have a few loose ends to track down.
14:01 asksol
like?
14:04 underseapilot
not necessarily celery related problems, but problems that have come up in the context of upgrading celery.
14:05 asksol
ah
14:05 underseapilot
e.g. the big one right now is something is causing the python loader under wsgi to freakout and be unable to find even core modules.
14:07 asksol
that happens because of the celery upgrade?
14:08 underseapilot
no, i don't think directly. but i have to fix it be able to finish playing around with the new celery.
14:11 asksol
right, of course :)
14:20 asksol
i'll deploy it here today
14:26 underseapilot
i had to make two changes in bin/celeryd.py - http://pastie.org/836780
14:27 underseapilot
the first is just a typo, the second is related to proper shutdown. without it i get zombies or detached children that never go away.
14:27 asksol
ah, yeah
14:27 asksol
I already fixed that
14:27 asksol
oh
14:27 asksol
the TERM handler?
14:27 underseapilot
again, i haven't had time to finish testing, but if you're deploying thought i'd mention it.
14:28 underseapilot
yah.
14:28 underseapilot
but it's really about calling stop in the parent process, not TERM per se.
14:30 asksol
yeah, I thought SystemExit did that
14:30 asksol
at least it did in my testing, but maybe there are platform differences
14:31 asksol
platform/version
14:31 underseapilot
platform, version and context, i.e. running under a shell, or supervisord, and so on.
14:31 asksol
yeah, ok
14:31 asksol
I'll add that then
14:32 asksol
gha. all of this feels really hackish
14:32 underseapilot
i agree.
14:32 underseapilot
it seems like it should be a solved problem, but i haven't found the library that solves it yet.
14:35 asksol
I pretty much expected a standard platform independent way of handling termination at least
14:36 asksol
and that finally clauses was executed by default on all signals except KILL
14:37 asksol
last time I had to catch term was in C
14:52 underseapilot
well, it's entirely possible there's another way to code it.
14:52 underseapilot
again, if i could get you a test this would probably be alot easier. :(
18:44 davidcramer
hrm
18:44 davidcramer
is there a way to know how many times something has retried
18:44 davidcramer
e.g. if its the ifnal retry i want to perform an action
18:50 otherjacob_
you could catch MaxRestartsExceededError
18:52 otherjacob_
i'm not sure if that gets thrown at the end of the nth retry or the beginging of the n+1th retry, but it shouldn't be too hard to figure otu
18:53 davidcramer
hm alright
18:53 davidcramer
I wish there were a better way to stop duplicate tasks :)
18:57 davidcramer
you know actually im just gonna make a @singular decorator that just runs the locking params
19:53 stovenator
asksol : thanks for the help on friday , have got the redis backend working (I think)
19:54 stovenator
now I have a question about the celerybeat scheduler ... is it possible to add/delete/change tasks without having to restart the celerybeat service?
20:02 donspaulding
asksol: ping
20:20 asksol
hey
20:21 asksol
davidcramer: kwargs["task_retries"]
20:21 asksol
or, @task def foo(x, y, task_retries=0):
20:22 asksol
well, you probably know the drill. there's a standard keyword argument
20:22 asksol
catching MaxRestartsExceeded is a nice solution though
20:26 otherjacob
it's nice if you only waned to override the action of when it's come far enough. if you wanted to keep retrying infinetely but do something on say the 5th, task_retries would be the way to go
20:29 asksol
yeah, I definitely like catching it. readable and simple
20:29 otherjacob
asksol: when does it get raised? at the end of nth or the start of nth+1
20:31 stovenator
answering my own question ... I assume I can use tasks.register and tasks.unregister with an instance of a periodic task, and that the scheduler will automatically add/delete/change that task on it's next run?
20:34 asksol
otherjacob: it uses task_retries + 1, and raises it if it's > max_retries
20:35 asksol
and it raises it before it gets to apply it
20:35 otherjacob
awesome to note
20:35 otherjacob
i'm hoping we can get on 1.0 before too long. still a few freebsd+mp issues to sort out
20:36 asksol
oh
22:00 asksol
stovenator: it doesn't work quite like that
22:00 asksol
bbl
22:53 stovenator
asksol: if it doesn't work like that, is there a way to register tasks after the beat service has started?