panoptes / panoptes-utils

A set of Astronomical utility functions. PANOPTES style. :hammer_and_wrench: :telescope: :stars:
https://panoptes-utils.readthedocs.io
MIT License
4 stars 9 forks source link

Sleep log messages clutter logs #258

Closed danjampro closed 3 years ago

danjampro commented 3 years ago

The logger calls inside CountdownTimer add an unnecessary amount of lines to the debug log. This is particularly bad when using short sleep intervals with long timers (e.g. while taking an exposure).

Code: https://github.com/panoptes/panoptes-utils/blob/86a99e19276197c7817015b226ef8cdba3e0dda7/src/panoptes/utils/time.py#L185

lspitler commented 3 years ago

@danjampro I guess we still want POCS to check-in with itself frequently (e.g. in case the weather goes bad?), but maybe the log message can be printed when the exposure is 5, 10, 15, 20%... complete if longer than some amount?

lspitler commented 3 years ago

@danjampro I see this is related to https://github.com/panoptes/POCS/pull/1046 . Looks like interval is configurable via config.yaml? Could set the default to a higher number like 5 seconds.

danjampro commented 3 years ago

@lspitler POCS uses a CountdownTimer to wait for exposures. Setting the interval to 5s would mean that we always wait a minimum of 5s for any exposure, including ones with much shorter exposure times.

lspitler commented 3 years ago

Got it. I see why this is not a quick fix.