2010-2-17

17:05 asksol
the exact time requirement is not implemented yet
17:06 asksol
I've mentioned before it shouldn't be that hard to do
17:06 asksol
you just need a way to convert strings like "3:00" to a datetime object
17:07 asksol
I would be happy if you could implement that :)
17:07 asksol
there's probably a library around to do that
17:07 asksol
then you have to make a PeriodicTask that executes on a fixed time instead of on an interval
17:08 underseapilot
w00t! i think this works!
17:08 asksol
underseapilot: awesome!
17:08 asksol
i'm sensing a 1.0.1 release
17:12 asksol
underseapilot: It works with the HUP signal as well
17:16 asksol
underseapilot: please verify HUP, and close http://github.com/ask/celery/issues#issue/68 if it works
17:17 underseapilot
will do, though might not finish testing till tomorrow.
17:18 asksol
sure
17:18 asksol
will probably have to test these changes for a few days
17:19 underseapilot
exactly.
17:22 asksol
luckily no one is processing credit card transactions with celery, yet
17:22 asksol
:)
17:22 asksol
or, I hope :/
17:25 asksol
the plan is to be robust enough to be able to do that, so we definitely need some functional tests of the kind you're writing
17:25 underseapilot
agreed. though not sure how i'm gonna do that yet. :)
17:25 underseapilot
internally we fire up a celeryd and test against that.
17:26 asksol
maybe use the worker_ready signal to tell when the worker has started
17:26 asksol
and the task_received signal to know the task has been received
17:26 asksol
and I'll add any additional signals you need
17:27 asksol
or maybe using events
17:27 underseapilot
but it's okay to fire up a Worker in another process? ( know how, but seems different than the other tests )
17:27 asksol
alternative is to start worker -> send task -> hopefully sleep long enough before you shut down
17:28 asksol
you should do it via exec() then
17:28 asksol
not using multiprocessing
17:28 asksol
or, that is, not using fork()
17:28 asksol
because multiprocessing has some bugs lurking around that path
17:29 underseapilot
ok
17:45 underseapilot
asksol, this change http://github.com/ask/celery/commit/fa0a4d4763f... relies on current_process() from multiprocessing
17:45 underseapilot
and looks like the second call isn't fully qualified.
17:56 rlotun
hi all - wondering if there was support for scheduled tasks (not PeriodicTasks, but one-off future tasks)
17:58 padt
rlotun: there's an eta kwarg for tasks
17:59 padt
18:01 rlotun
padt: brilliant, thanks!
18:01 padt
np
18:01 rlotun
padt: I also sent an email to the google group but realized it might be faster to come here first, so ignore the double question ;-)
18:02 padt
heh. good thinking
18:02 padt
usually depends on the time of day if it's something Ask has to answer. We're in cet+1
18:03 rlotun
you work for Opera too?
18:04 padt
yeah. Not on the same stuff though. I'm just the pedant that goes through the docs every once in a while
18:06 rlotun
that's cool. I work at a small startup in London called TweetDeck. celery is perfect for our needs and it's great that it exists.
18:08 padt
that's the adobe air thingy? I think I tried that one
18:08 padt
the adobe runtime was a bit iffy on linux at the time unfortunately
18:08 rlotun
yeah, though we also have an iphone client and others in the works
18:08 rlotun
you might want to give it another spin, I think those issues have been fixed ;-)
18:09 padt
cool
18:09 padt
at the moment I share an office with the guy that maintains the opera twitter widget though, so we'll see :)
18:09 padt
come to think of it, I think I have a t shirt even. Was there a tweetdeck one from startupswag?
18:10 rlotun
yeah actually
18:12 padt
Then I've probably advertized for you guys in the office!
18:13 rlotun
awesome! we can send more, and some tweeting birds too if you'd like ;-)
18:13 rlotun
you should definitely give us a shout if you're ever in London
18:15 padt
Cool. Will do
18:18 harel
asksol: looking at the eta arg.. .i go down the path and see it end up in TaskPublisher, where its sent as part of message_data to the carrot Publisher. ...
18:18 harel
not sure what is missing then...
18:19 harel
could it be covertly implemented already?
18:25 harel
asksol: gotta go feed my boys before they devour the furniture. let me know about eta (not the Basque separatists, you know the one i mean)
20:01 bartek-
Hi there. I just got celery working great with Django and now I want to deploy it on some production sites. I want to know the best approach to this. I use virtualenv's for my sites on production, should I install seperate celery packages and run separate instances of it for each website, or am I better off to just run a single one and install the package under the root python install?
20:11 bartek-
Ooh, I guess one issue I just encountered is that celery doesn't seem to be respecting it's default max_retries of 3 .. Mine has retried 7 times now. I can paste some code . if someone is alive :- )
20:40 bartek-
Oh, I need to learn more about RabbitMQ (I bookarked asksol's article he linked!) .. it seems after restarting my rabbitmq-server, it's smoother now. Looks like I had a bunch of instances "caught up" from all my testing.
20:51 bartek-
Hmm, it still keeps retrying infinietly.
20:52 bartek-
infinitely*
20:54 underseapilot
bartek- maybe you want to start celeryd with --discard once?
21:13 bartek-
man im in a totally different world of programming when you can restart a service and it fires off the backlog it had
21:13 bartek-
awesome :)
22:08 donspaulding
Still trying to get celery to run tasks on Windows. celeryd's logging tells me the taskpool gets created, but the task never completes. Working off a test script that asksol gave me yesterday, here's my current traceback. Does anyone know what's going on here? http://pastie.org/829783
22:12 underseapilot
is that really the same file? b/c the traceback references line number that don't exist.
22:27 asksol
use x.apply_async(MicrParse(), ...) in that case
22:27 asksol
you're using the class as Target, so calling it means MicrParse.__new__(3)
22:28 asksol
so you have to instantiate it to make it use MicrParse.__call__(3)
22:28 asksol
urm. MicrParse().__call__(3)
22:28 asksol
but I think celery.loaders.detect_loader is the source of your problem
22:29 asksol
the real problem that is, the __new__ error is just because the test script is wrong
22:29 asksol
donspaulding: do you use "project.settings" as settings module?
22:31 donspaulding
underseapilot: not the same file, but the error is the same with the file I pasted. Nice catch ;-)
22:31 donspaulding
asksol: yes
22:34 donspaulding
asksol: changing it to MicrParse() gets me further. Now I've got an exception in my run(), will fix that before continuing the test.
22:36 asksol
donspaulding: don't use project.settings ;)
22:36 asksol
that's the bug
22:36 asksol
there's an issue about it at github
22:38 asksol
make celeryd cd into the project dir maybe
22:38 asksol
22:42 donspaulding
asksol: yeah, I read through that bug when you pasted it yesterday, I'm just not smart enough to see it.
22:43 donspaulding
here's my most recent exception http://pastie.org/829783
22:43 donspaulding
underseapilot: and yes, those are the actual files, unmodified ;-)
22:44 underseapilot
donspaulding, very good then. ;)
22:45 asksol
don't run such a complex task, you can't see the traceback so hard to debug
22:53 donspaulding
asksol: a simpler task succeeds: http://pastie.org/829783
22:54 donspaulding
asksol: Am I wasting my time with this test script?
22:54 donspaulding
asksol: more importantly, am I wasting your time?
23:04 asksol
there's a bug in your task, I guess
23:05 asksol
try to run it manually outside the pool (Task.run(...))
Page 3 of 3   ← Previous  (296 total)