2010-3-28
| 19:29 | blackbrrr | is it possible to schedule a task for a specific time, instead of a timedelta? |
| 20:13 | ITSBTH | I'm having some issues with celery... |
| 20:13 | ITSBTH | |
| 20:14 | ITSBTH | itsbth@itsbth-laptop ~/gmluadoc/taskqueue $ python run.py |
| 20:14 | ITSBTH | Starting 2834 tasks |
| 20:14 | ITSBTH | It exits immediatly after that |
| 20:14 | ITSBTH | No errors |
| 20:17 | ITSBTH | Running the task using task.delay works fine |
| 20:23 | asksol | where does complete come from? |
| 20:25 | ITSBTH | Good question |
| 20:25 | ITSBTH | I originally used ready() |
| 20:26 | ITSBTH | Hm... |
| 20:26 | ITSBTH | Nevermind, I'm an idiot |
| 20:27 | ITSBTH | Had a typo |
| 21:17 | ed1t | is apply_async and delay the same thing? |
| 21:34 | padt | ed1t: yes, but different args supported |
| 21:34 | padt | from the api docs |
| 21:34 | padt | classmethod Task.delay(*args, **kwargs) |
| 21:34 | padt | Shortcut to apply_async(), with star arguments, but doesn’t support the extra options. |
| 21:35 | ed1t | so if I wanted to use the countdown arg, i could use delay ? |
| 22:04 | asksol | ed1t: nope |
| 22:04 | asksol | then you need to use apply_async :( |
| 22:05 | ed1t | so then with apply_async can I pass my own parameters too? |
| 22:06 | asksol | sure! use args=[], kwargs={} |
| 22:07 | asksol | so .delay(*args, **kwargs) is exactly the same as .apply_async(args=args, kwargs=kwargs) |
| 22:07 | asksol | or more exactly |
| 22:07 | asksol | @classmethod |
| 22:07 | asksol | def delay(self, *args, **kwargs): |
| 22:07 | asksol | return self.apply_async(args, kwargs) |
| 22:08 | asksol | brb |
| 23:04 | ed1t | if I want to "chain" the tasks i.e. when the task is done executing, i want to reschedule the task with coutdown 60 |
| 23:04 | ed1t | i want the task to run every 60 seconds, but I dont want to run periodTask, because I would like to change the countdown on the fly |
| 23:05 | ed1t | is it recommended to call re-schedule from that same method? |