Internals: The worker

    The timer uses heapq to schedule internal functions. It’s very efficient and can handle hundred of thousands of entries.

    When a message is received it’s converted into a celery.worker.job.TaskRequest object.

    The timer schedules internal functions, like cleanup and internal monitoring, but also it schedules ETA tasks and rate limited tasks. If the scheduled tasks eta has passed it is moved to the execution pool.