previously the scheduler did not have a logger and scheduled functions
that wanted to log something (storage.GetExpirationHandler) had to bring
one with them.
This has unfortunate side effect that while the function is scheduled
the logger can't be freed.
But when reloading the loggers are closed and than reopened. This is
done so that the files can be logrotated/changed.
If a file is scheduled to be deleted in a week, the logger will not be
GCed, for a week, and as such the fd to the log file will not be closed.
previously the scheduler did not have a logger and scheduled functions that wanted to log something (storage.GetExpirationHandler) had to bring one with them.
This has unfortunate side effect that while the function is scheduled the logger can't be freed.
But when reloading the loggers are closed and than reopened. This is done so that the files can be logrotated/changed.
If a file is scheduled to be deleted in a week, the logger will not be GCed, for a week, and as such the fd to the log file will not be closed.