redbeat icon indicating copy to clipboard operation
redbeat copied to clipboard

"Scheduler: Sending due task" log not appearing even though log level is INFO

Open PaarthB opened this issue 4 years ago • 4 comments

I am using celery-redbeat==2.0.0, and it is scheduling tasks correctly at regular intervals as defined in the beat schedule. This can be confirmed as I see logs from worker process with Received task .... However, there are no corresponding logs in beat process for Scheduler: Sending due task . . . . Why is this happening? The log level for both worker and beat is set to INFO.

In fact, I see no logs from beat after this:

Configuration ->
. broker -> redis://redis:6379/0
     . loader -> celery.loaders.app.AppLoader
     . scheduler -> redbeat.schedulers.RedBeatScheduler
     . redis -> redis://redis:6379/0
        . lock -> `redbeat::lock` 25.00 minutes (1500s)
     . logfile -> [stderr]@%DEBUG
     . maxinterval -> 5.00 minutes (300s)

But I can see it is working fine, as my tasks are executed on schedule as expected. I am running both worker and beat through supervisord, but this happens if I run it directly as well.

I don't think this is specific to redbeat though, as I observe the same behaviour with PersistentScheduler default scheduler from celery as well. I recently updated to celery==5.0.5, and this wasn't happening before the update.

PaarthB avatar Feb 15 '21 10:02 PaarthB

Having the same issue here

espoirMur avatar May 17 '21 14:05 espoirMur

Hi! Just recently had to set up RedBeat and I am having the same issue. Although in my case, when I change back to the PersistentScheduler, all logs are correctly displayed again. I have tested this in celery version 5.1.2 and the most recent 5.2.0 version as well.

Is there any update regarding this issue? Thank you!

Luned avatar Nov 08 '21 17:11 Luned

Did you by any chance customize celery's logging by using @signals.setup_logging.connect ?

jlaine avatar Dec 06 '21 13:12 jlaine

Hey @jlaine , no I verified and I haven't done any such customisation. Also this would have affected all celery logs, but this only happens for celery-beat not worker (which is capturing all logs correctly)

PaarthB avatar Dec 08 '21 04:12 PaarthB

There has been some cleanup of logging in 2.1.0. Please let me know if it helped or not.

sibson avatar May 18 '23 01:05 sibson