Skip to content
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

Merged
merged 5 commits into from
Aug 20, 2023
Merged

Fix some settings not being applied properly #661

merged 5 commits into from
Aug 20, 2023

Conversation

Syer10
Copy link
Collaborator

@Syer10 Syer10 commented Aug 20, 2023

No description provided.

@Syer10 Syer10 requested a review from schroda August 20, 2023 17:15
@@ -62,7 +62,8 @@ object ProtoBackupExport : ProtoBackupBase() {
timeOfDay
)
},
::scheduleAutomatedBackupTask
::scheduleAutomatedBackupTask,
ignoreInitialValue = false
Copy link
Collaborator

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

Copy link
Collaborator Author

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

Copy link
Collaborator Author

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

Copy link
Collaborator

@schroda schroda Aug 20, 2023

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)
Copy link
Collaborator

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

Copy link
Collaborator Author

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)
Copy link
Collaborator

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

@Syer10 Syer10 merged commit 8db6c21 into master Aug 20, 2023
2 checks passed
@Syer10 Syer10 deleted the settings_fixes branch August 21, 2023 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants