-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
lib/model: Consistently show folder description in startup messages #3825
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ func init() { | |
|
||
type sendOnlyFolder struct { | ||
folder | ||
config.FolderConfiguration | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a joke about how Latvian president asked Lithuanian president to lend them tanks when Russian invaded Latvia. The Lithuanian president asked whether the Latvian president would like one of them, or all of them... while Lithuania only had two... TL;DR: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have a funny joke about where exactly you can embed your config... anyway, that folder thing is a bit of a weird appending as it has almost no functionality. Should sort that out same day. |
||
|
||
func newSendOnlyFolder(model *Model, cfg config.FolderConfiguration, _ versioner.Versioner, _ *fs.MtimeFS) service { | ||
|
@@ -30,6 +31,7 @@ func newSendOnlyFolder(model *Model, cfg config.FolderConfiguration, _ versioner | |
stop: make(chan struct{}), | ||
model: model, | ||
}, | ||
FolderConfiguration: cfg, | ||
} | ||
} | ||
|
||
|
@@ -49,7 +51,7 @@ func (f *sendOnlyFolder) Serve() { | |
|
||
case <-f.scan.timer.C: | ||
if err := f.model.CheckFolderHealth(f.folderID); err != nil { | ||
l.Infoln("Skipping folder", f.folderID, "scan due to folder error:", err) | ||
l.Infoln("Skipping scan of", f.Description(), "due to folder error:", err) | ||
f.scan.Reschedule() | ||
continue | ||
} | ||
|
@@ -67,7 +69,7 @@ func (f *sendOnlyFolder) Serve() { | |
} | ||
|
||
if !initialScanCompleted { | ||
l.Infoln("Completed initial scan (ro) of folder", f.folderID) | ||
l.Infoln("Completed initial scan (ro) of", f.Description()) | ||
initialScanCompleted = true | ||
} | ||
|
||
|
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.
You could embed both, and drop the .cfg. everywhere.
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.
Yeah, that'd be cleaner. And fix the tests. I'll get to it.