title: Efficient recurring tasks in celery?
body: <p>I have ~250,000 recurring tasks each day; about a fifth of which might be updated with different scheduled datetimes each day.</p>
  
  <p>Can this be done efficiently in Celery? - I am worried about this from celery's <a href="https://github.com/celery/celery/blob/master/celery/beat.py#L204" rel="nofollow">beat.py</a>:</p>
  
  <pre><code>    def tick(self):
          """Run a tick, that is one iteration of the scheduler.
  
             Executes all due tasks.
  
         """
          remaining_times = []
          try:
              for entry in values(self.schedule):
                  next_time_to_run = self.maybe_due(entry, self.publisher)
                  if next_time_to_run:
                      remaining_times.append(next_time_to_run)
          except RuntimeError:
              pass
  
          return min(remaining_times + [self.max_interval])
  </code></pre>