芹菜中有效的重复性任务?

时间:2014-01-22 04:47:08

标签: python celery celery-task celerybeat recurring-events

我每天有250,000个重复的任务;其中约五分之一可能每天更新不同的预定日期时间。

这可以在芹菜中有效地完成吗? - 我对芹菜的beat.py

感到担忧
    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])

0 个答案:

没有答案