0

I have a periodical celery job that is supposed to run every night at midnight. Of course I can just run the system and leave it overnight to see the result. But I can see that it's not going to be very efficient in terms of solving potential problems and energy.

In such situation, is there a trick to make the testing easier?

lang2
  • 11,433
  • 18
  • 83
  • 133
  • possible duplicate of [How do you unit test a Celery task?](http://stackoverflow.com/questions/12078667/how-do-you-unit-test-a-celery-task) – Mariusz Jamro Aug 07 '15 at 12:41

1 Answers1

0

To facilitate testing you should first run the task from ipython to verify that it does what it should.

Then to verify scheduling you should change the celerybeat schedule to run in the near future, and verify that it does in fact run.

Once you have verified functionality and schedule you can update the celerybeat schedule to midnight, and be at least some way confident that it will run like it should.

scytale
  • 12,346
  • 3
  • 32
  • 46