2010-2-18

22:30 asksol
result.ready()
22:30 asksol
from celery.result import AsyncResult
22:30 asksol
result = AsyncResult(task_id)
22:30 rburhum
ah, so I have to save my task_id on my own table
22:30 rburhum
there is no, "Registry, give me all task ids"
22:31 asksol
no, there's not. if you need that, you have to implement it yourself
22:31 asksol
it's optimized around the common case
22:31 rburhum
got it
22:31 rburhum
thanks
22:32 asksol
please share if you implement it in a generic way :)
22:32 asksol
or not so generic, whatever. could be nice as an example
22:46 rburhum
sure, i will
22:47 abadr
Celery is taking up a few hundred MB. Any idea why?
22:47 abadr
Or how I can find out? Bringing my server to a crawl
22:50 abadr
kill'd it. wasn't processing any jobs.
22:50 abadr
would love to find out why that happened
23:00 asksol
abadr: running with DEBUG on?
23:00 abadr
asksol: Django? one server yes, one server no
23:01 asksol
with a few hundred MB, are you talking RAM?
23:01 abadr
yes
23:01 abadr
just today it jumped up... didn't even have any jobs
23:02 abadr
it's been running the background for a week or so
23:02 asksol
if settings.DEBUG is on, that would probably happen at some point
23:02 abadr
why?
23:02 asksol
because it logs queries
23:02 abadr
hm
23:02 abadr
ok
23:03 asksol
there could be other reasons, but I haven't heard about it before
23:03 abadr
I see that I'm also on an old version. Will upgrade to 1.0 and see if that helps.
23:03 asksol
right, that would do it then
23:03 asksol
the old version checks the periodic task table almost every second
23:04 asksol
== a connection.queries the size of the sun
23:04 abadr
i see
23:04 asksol
the new version doesn't use the database for periodic tasks at all
23:04 abadr
just listens to amqp?
23:04 asksol
no, there's a new service called celerybeat
23:04 abadr
I saw those scripts installed to /usr/local/bin
23:05 asksol
it's a centralized, service so it doesn't have to share state, so there's no chance for race conditions
23:05 asksol
and also, it doesn't have to poll the table every second :)
23:05 abadr
am I supposed to install celeryinit to init.d?
23:06 asksol
no, it's just for creating tables when not using python
23:06 asksol
23:07 abadr
k
23:07 asksol
run celeryd like before, just if you use periodic tasks, you need to run celerybeat
23:07 asksol
if you don't need periodic tasks, don't run it
23:08 asksol
and don't run more than one celerybeat servers
23:09 abadr
can you foresee celery having any problems handling two instances of the same app running on the same machine?
23:09 asksol
-s
23:09 abadr
one is in debug, one isn't
23:10 asksol
not sure
23:10 asksol
but it's pretty theoretical at this stage, with an older version and no similar reports
23:11 abadr
yep
23:11 asksol
You should watch it a bit more closely for a while
23:15 abadr
asksol: sorry, but I'm a little confused. What's the correct way to daemonize celery now if I don't use periodic tasks? Changelog seems to say celerybeat, you say otherwise :)
23:16 abadr
yeah I will keep an eye on it
23:30 asksol
that doesn't have anything to do with periodic tasks. The --detach argument has been removed because it was buggy
23:30 asksol
and there was no fix in sight
23:30 asksol
so use start-stop-daemon on debian/bsd
23:30 asksol
or supervisord on anything else
23:31 asksol
there's example init scripts here:http://github.com/ask/celery/tree/master/contrib/debian/init.d/
23:32 asksol
and example supervisord configuration here: http://github.com/ask/celery/tree/master/contri...
23:32 asksol
supervisord is pretty great, as it also make sure it's always running
23:33 abadr
oh, I see. thanks
23:50 abadr
asksol: start-stop-daemon isn't working. it thinks it's working, and a new pid gets written to the pidfile, but then nothing is left running and nothing is written to the log
Page 2 of 2   ← Previous  (164 total)