-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix some settings not being applied properly #661
Conversation
@@ -62,7 +62,8 @@ object ProtoBackupExport : ProtoBackupBase() { | |||
timeOfDay | |||
) | |||
}, | |||
::scheduleAutomatedBackupTask | |||
::scheduleAutomatedBackupTask, | |||
ignoreInitialValue = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this work?
I think I started the interval in the ServerSetup because the ProtoBackupExport never gets loaded unless a backup gets created
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should, objects are statically initialized
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though I see now that they are initialized in ServerSetup, so I'll revert these ones
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I confused it with the Updater, because that only gets initialized lazily, so I just didn't change it like this when I added the server setting subscription
@@ -79,7 +79,7 @@ fun applicationSetup() { | |||
} else { | |||
setLogLevel(Level.INFO) | |||
} | |||
}) | |||
}, ignoreInitialValue = false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this
// set log level early
if (debugLogsEnabled(config)) {
setLogLevel(Level.DEBUG)
}
still needed in the ConfigManger with this change?
I believe the issue with the debug logs is because I forgot to set the default log level, which was INFO before in the logback config file, when I added the file logging
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it still is, configs would get initialized and there are some logs in the config manager that should be outputted
@@ -53,7 +53,7 @@ class Updater : IUpdater { | |||
private var currentUpdateTaskId = "" | |||
|
|||
init { | |||
serverConfig.subscribeTo(serverConfig.globalUpdateInterval, ::scheduleUpdateTask) | |||
serverConfig.subscribeTo(serverConfig.globalUpdateInterval, ::scheduleUpdateTask, ignoreInitialValue = false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The interval also gets started in the ServerConfig
I think I did it that way for the same reason as for the backup interval
No description provided.