#celery

Sept. 2nd, 2010

08:25 elnio
:(
08:58 elnio
asksol u still here?
09:07 _cheerios
fire up an amazon ec2 instance to test if nothing else, quick :)
10:47 ironfroggy_
elnio: did you ping me earlier?
10:49 elnio
hi
10:49 elnio
yes cause you where the only one i saw in
10:49 elnio
and i needed some help with my celery prject
10:49 elnio
if anyone is willing to help let me know
12:05 elnio
is anyone here?
12:16 elnio
i need some help with my celery project can somebody help
12:16 elnio
?
12:17 padt
elnio: just ask a question.
12:17 padt
don't ask if you can ask first
12:17 elnio
yp i ask cause i want to see if there is actually hearing
12:17 elnio
and its a bit more complex to describe
12:18 elnio
the thing is that i have a problem returning the value from the task to the actual code which handles the return value
12:18 elnio
it seems like it gets messed up in the sending process
12:18 elnio
cause i have a print method inside the tasks code
12:19 elnio
and it prints the value just fine
12:19 padt
so what do you get and what did you expect to get?
12:19 elnio
but when i receive it in my code with these lines job = TaskSet( tasks = taskList )
12:19 elnio
result = job.apply_async()
12:19 elnio
result.ready() # has all subtasks completed?
12:19 elnio
result.successful() # was all subtasks successful?
12:19 elnio
resultsList = result.join()
12:20 elnio
for example i try to return a string
12:20 elnio
and i get instead �Uadadadadadaq.
12:20 elnio
or with an int i get something else
12:22 elnio
the thing is that this was working before
12:22 elnio
but i changed the celeryd invokation
12:22 elnio
before i run it with django
12:23 elnio
but now i made a celeryconfig module and i put backend the amqp
12:23 elnio
this is why i was wondering if i do something wrong
12:23 elnio
cause the result is correct inside the task code..
12:23 elnio
when its returned there is the prob
12:23 elnio
can you help?
12:25 padt
might be the serialization
12:25 padt
resultsList contains a number of strings I guess?
12:26 elnio
yp
12:26 elnio
or a list of ints or whatever
12:26 elnio
is the return value
12:29 padt
it's not the return value, it's the set of return values, but OK
12:29 padt
how are those values different from the ones you expected
12:29 elnio
yp you are right
12:30 elnio
well for example i waited adadadadada and i got �Uadadadadadaq. or i waited 9 and i got �K .
12:31 elnio
did i help at all?
12:33 padt
try printing the hex values for three first bytes of that string. might be a BOM
12:33 padt
print [hex(ord(e) for e in retval[:3]]
12:33 padt
or something like that
12:35 elnio
ok just a sec
12:39 elnio
i put a print [hex(ord(e) for e in resultsList[:3]]
12:40 elnio
where resultsList has the resultset
12:40 elnio
but it throws an exception on this line
12:44 padt
you didn't close the laste parenthisis
12:44 padt
or, I didn't and you copypasted
12:45 elnio
:P
12:45 elnio
still my fault
13:14 elnio
man can i ask something else
13:14 elnio
cause i get an error that i dont know why its occuring
13:14 elnio
Missing hostname for AMQP connection. Exception Location: /usr/lib/python2.6/site-packages/carrot/backends/pyamqplib.py in establish_connection, line 186
13:15 elnio
what is this does anybody know?
13:24 _cheerios
misconfigured settings
14:42 elnio
_cheerios:what do you mean misconfigured settings?
14:45 elnio
can someone else answer me why i get this error
14:45 elnio
Missing hostname for AMQP connection. Exception Location: /usr/lib/python2.6/site-packages/carrot/backends/pyamqplib.py in establish_connection, line 186
14:49 padt
elnio: Presumably because the host name for the AMQP connection is missing?
14:49 elnio
which means?
14:50 elnio
i dont use ampq as the backend
14:50 elnio
i use a database
14:53 padt
elnio: are you sure you have the correct settings? Don't see a reason why code should be running in pyamqplib.py if you've set it up with db backend
15:14 cleifer
running into 'Missing hostname for AMQP connection.' --> using ghettoq Redis backend - anyone familiar with this error?
15:17 bahamas
cleifer: that sounds like you haven't properly configured your settings. have you done it like this http://ask.github.com/celery/tutorials/otherque... ?
15:18 cleifer
bahamas, we're moving from celery 1. something to 2.0 so that's quite likely things are out of sync
15:19 bahamas
oh, you should read the differences then
15:19 cleifer
get_backend_cls()
15:19 cleifer
Out[5]: <class 'carrot.backends.pyamqplib.Backend'>
15:20 cleifer
yah -- that there's my problem ^^ need it to use redis
17:14 Scala
I'm getting celery started up for the first time. Using django. Are the configuration lines supposed to go in my settings.py or in /etc/default/celeryd?
17:17 bahamas
Scala: in your settings.py
17:19 Scala
The broker settings go in settings.py and daemon settings go in /etc/default/celeryd, correct?
17:20 bahamas
yup.
17:20 Scala
bahamas: Neato. thanks.
17:22 bahamas
yw
17:59 movedir
Has anyone tried running djcelery with celerybeat from head?
17:59 movedir
I would like to use the new periodic task database admin stuff, but it appears to be broken.
18:06 druski
hi everyone, new to celery/rabbitmq and have a quick question: I know rabbitMQ doesn't support priorities, but I need to have a Priority 1 tasks that need to be run as soon as possible and Priority 10 tasks that should only be run if there are NO priority 1 tasks in the queue. Is there any way to set this up using multiple queues?
19:26 movedir
druski: You could use routing.
19:26 movedir
and set up some workers specifically for priority 1 tasks.
20:09 Scala
With django-celery, I have a couple functions marked with @task decorator and are executed in a view. Do I need to restart celeryd if I make any changes to my task function?
20:44 gthb
Scala: yes, you do
21:10 justdave
I'm trying to route different tasks into different queues and it seems to be not working, all of the tasks end up in the default queue instead
21:10 justdave
I'm using the dict method in CELERY_ROUTES where I have a task name -> queue mapping
21:12 justdave
there's a lot in the docs and I've tried a number of different things, so I'm not even sure what info would be useful to share to help anyone help me troubleshoot it
22:59 dtran320
Hi all
22:59 dtran320
I'm encountering really strange errors both on my local machine and on one of my servers... I'm getting CarrotListener: Connection Error: Socket closed. Trying again in 4 seconds...
22:59 dtran320
when i start up celery
22:59 dtran320
rabbitmq seems to be running fine
23:00 dtran320
i screwed up the hostname on the server but on my local box that definitely hasn't changed but randomly started having issues

Sept. 3rd, 2010

02:54 justdave
is there some way to examine a task without modifying it in the queue? I have CELERY_TRACK_STARTED = True in my config... when a job gets picked up, the status changes from PENDING to STARTED, but only once. the next time I check on that task, it shows PENDING again, and stays that way until it finishes and changes to SUCCESS
02:54 justdave
or specifically, it'd be nice if the state stayed as STARTED until it finished instead of going back to PENDING when I look at it