#celery

/

      • ustunozgur joined the channel
      • jdunck joined the channel
      • [o__o] has left the channel
      • -- BotBot disconnected, possible missing messages --
      • [o__o] joined the channel
      • Cromulent joined the channel
      • dlitvak has quit
      • dlitvak joined the channel
      • message144 has quit
      • asksol has quit
      • rustyrazorblade joined the channel
      • zmsmith joined the channel
      • dinopetrone joined the channel
      • dinopetrone
        is there an easy function to kill all scheduled tasks?
      • caleb_ joined the channel
      • Cromulent has quit
      • dgel joined the channel
      • the_rat joined the channel
      • dgel has quit
      • the_rat has quit
      • sandywalsh has quit
      • dinopetrone has quit
      • ignas has quit
      • ojii is now known as ojii|afk
      • codex0 joined the channel
      • sandywalsh joined the channel
      • ignas joined the channel
      • asksol joined the channel
      • asksol
        myusuf3: should it be using more than one?
      • myusuf3
        asksol weill I have 6 conncurrent workers
      • and it used to use more connections
      • and looks like its waiting on connection to rabbitmq
      • jdunck has quit
      • jdunck joined the channel
      • jdunck has quit
      • ignas has quit
      • asksol has quit
      • asksol joined the channel
      • asksol
        myusuf3: one or two connections are used for consuming, and one or more connections (< pool limit) is used for publishing
      • myusuf3
        hmm
      • asksol it changed since the last release
      • I used to use more connection
      • asksol also when I used gevent in production
      • ignas joined the channel
      • the workers never return
      • they get assigned to worker, but never finish
      • nanonyme
        Heh, gevent sounds like trouble if there's non-monkeypatched shared connectioons
      • myusuf3
        so all the workers are busy but they never some back
      • nanonyme the issue I was talking about above isn't using gevent
      • nanonyme
        Indeed
      • myusuf3, I just commented to the case you mentioned
      • myusuf3
        nanonyme hmm that might be it
      • but I have the same setup locally
      • and it works fine
      • nanonyme
        Well, you don't notice gevent bugs until things start blocking for longer than expected
      • asksol, are the said connections monkeypatched in Celery, btw?
      • (ie if gevent is used)
      • myusuf3
        nanonyme well gevent pool
      • monkey patches everything
      • hopefully thats not how it is in celery
      • :)
      • nanonyme
        myusuf3, well, it's about timing here. If you monkeypatch things too late, it came have dramatic outcomes
      • myusuf3
        nanonyme well I am doing it on invocation
      • at the very beginning
      • so in the celery process passing -p
      • I dont think I can get earlier than that
      • nanonyme
        Right
      • asksol
        what would it use the connections for? sending subtasks? results? definitely uses more than one connection here with 4 procs
      • gevent patches celery, yeah
      • myusuf3
        I am doing alot of chaining using |
      • I dont know just trying to understand why it went from using up 5 connections to using 1
      • also Substantial drift from celery@16a3fb13-116f-43b4-9be0-1f8dfad8194f may mean clocks are out of sync. Current drift is
      • 2013-05-29T19:31:08.893410+00:00 app[worker.4]: 29.1138370037 seconds (including message overhead).
      • I am getting that now more recently
      • asksol ^
      • so would me setting broker pool limit to 1 account for this
      • because it wasn't being honoured
      • previously
      • diogobaeder joined the channel
      • cmwslw joined the channel
      • diogobaeder
        Hi guys! Hey, can anyone help me with using "headers" exchanges with Celery 2.5? I can't get it working at all :-(
      • cmwslw
        Is it ridiculous to use a RabbitMQ server with the only worker being itself?
      • Basically, I'm looking for a queue with a nice interface.
      • nanonyme
        Imo not
      • cmwslw
        nanonyme: is that to me?
      • Right now I can't see myself expanding to other worker servers, but I guess that might be a nice plus
      • flashingpumpkin is now known as fpk^away
      • asksol
        cmwslw: no, even one worker is useful
      • myusuf3: a pool limit of 1 means it will use one connection
      • cmwslw
        asksol: Ok, just wondering if I was doing it way wrong
      • asksol
        myusuf3: substantial drift is interesting, but not critical. would be interesting with some stats for that
      • myusuf3: it means that the clocks are out of sync, but also maybe it just received it too late
      • hard to know the difference ;)
      • diogobaeder
        Regarding "headers" exchanges, does anyone know where there's an example of how to use them with Celery? I can't get it to work here, no matter what I set in my CELERY_QUEUES
      • asksol
        if it's on the same machine then it's definitely the latter
      • sandywalsh_ joined the channel
      • diogobaeder: no example afaik, I don't remember if .apply_async forwards the headers argument
      • diogobaeder: you should try setting envvar KOMBU_LOG_DEBUG=1 to see what the kombu calls ends up being
      • adm joined the channel
      • ninkotech_ joined the channel
      • e.g. KOMBU_LOG_DEBUG=1 python; >>> add.apply_async(exchange='hhh', headers={...})
      • caleb_` joined the channel
      • diogobaeder
        asksol, ah, interesting, thanks. Alternatively, is there any example of setting up the exchanges, queues and bindings manually, by using the AMQP classes directly?
      • asksol
        diogobaeder: if headers is not passed then you can add it to extract_exec_options in celery/app/task.py and open an issue
      • diogobaeder: not sure what you mean by manually, but if you mean using the channel directly then no
      • diogobaeder
        asksol, ack, thanks. But how do I define the bindings with the appropriate arguments, in order to go through the "headers" matchers?
      • Ah, k
      • caleb_ has quit
      • Kronuz has quit
      • sandywalsh has quit
      • fidothe has quit
      • Maior has quit
      • ninkotech__ has quit
      • asksol
        you can subclass Queue's .declare method and add that to CELERY_QUEUES
      • caleb_` is now known as caleb_
      • but should be able to use the existing Queue
      • Kronuz joined the channel
      • message144 joined the channel
      • Exchange has a new passive attribute in kombu master, that could be added to Queue as well
      • diogobaeder
        asksol, interesting, but even in 2.5? 2.5 doesn't accept Queue instances in the CELERY_QUEUES config, does it?
      • asksol
        diogobaeder: no, not on 2.5 that's true
      • diogobaeder
        Btw, CELERY_QUEUES should accept "arguments" items in each queue dict, shouldn't it? It doesn't seem to be passing them to Kombu
      • asksol
        I did try using header exchanges with celery 2.x so should be possible
      • diogobaeder
        asksol, this is what I'm having: http://paste.ubuntu.com/5714546/
      • asksol
        diogobaeder: it's queue_arguments, exchange_arguments and binding_arguments for queue_declare/exchange_declare and queue_bind respectively
      • (this mess is why it now uses the instances...)
      • diogobaeder
        asksol, oh, that makes a lot of difference :-)
      • asksol, yeah, they're much better, I agree :-)
      • (And congratz for that change ;-)
      • diogobaeder needs to convince his team to migrate to 3.x
      • asksol
      • someone should document this, it's still in use by the add_consumer control command
      • diogobaeder
        asksol, thanks, I'll try with queue_arguments and binding_arguments, as with exchange_arguments it didn't work
      • asksol, one more question, sorry to bother you with this: how do I use current_app.send_task, to send a message, but specifying only the exchange to send to and the appropriate arguments, but not the specific queue to which it should route the message?
      • I want the message to be routed according to the headers arguments
      • If I try specifying the exchange in the args for the method call, all I get is "celery.exceptions.QueueNotFound: "Queue 'celery' is not defined in CELERY_QUEUES""
      • asksol
        diogobaeder: the queue= argument makes it take default arguments from the dict in CELERY_QUEUES
      • so just specify exchange and other options directly and omit the queue
      • diogobaeder
        asksol, I'm trying with these args, and it doesn't work: http://paste.ubuntu.com/5714593/
      • Did I miss something?
      • jdunck joined the channel
      • In that example, the "node" variable is a dict, so that I can try matching the headers arguments
      • jdunck has quit
      • jdunck joined the channel
      • Coalpaw has quit
      • jdunck has quit
      • Coalpaw joined the channel
      • Coalpaw has quit
      • ustunozgur has quit
      • alekibango has quit