Skip to content

Commit

Permalink
Merge 427636a into a22dc23
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisclark committed Feb 18, 2014
2 parents a22dc23 + 427636a commit e6dcff8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion celery/beat.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,8 @@ def tick(self):

def should_sync(self):
return (not self._last_sync or
(monotonic() - self._last_sync) > self.sync_every)
(monotonic() - self._last_sync) > self.sync_every) or \
self.app.conf.CELERY_SYNC_EVERY_SCHEDULED_TASK

def reserve(self, entry):
new_entry = self.schedule[entry.name] = next(entry)
Expand Down
2 changes: 1 addition & 1 deletion celery/tests/app/test_beat.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def foo():
scheduler.apply_async(scheduler.Entry(task=foo.name, app=self.app))
self.assertTrue(foo.apply_async.called)

def test_apply_async_should_not_sync(self):
def test_should_sync(self):

@self.app.task(shared=False)
def not_sync():
Expand Down

0 comments on commit e6dcff8

Please sign in to comment.