forked from forgejo/forgejo
Make cron task no notice on success (#19221)
Change all cron tasks to make them no notice on success default. Instead if a user wants notices on success they need to add NOTICE_ON_SUCCESS=true instead. ## ⚠️ BREAKING ⚠️ This changes the cron config so that notices on success are no longer set by default and breaks NO_SUCCESS_NOTICE settings. Instead users who want notices on success must set NOTICE_ON_SUCCESS=true instead. Signed-off-by: Andrew Thornton <art27@cantab.net> * Update custom/conf/app.example.ini Co-authored-by: Norwin <noerw@users.noreply.github.com> Co-authored-by: Norwin <noerw@users.noreply.github.com>
This commit is contained in:
parent
70628bd870
commit
acb9fc5f8e
4 changed files with 30 additions and 32 deletions
|
@ -26,7 +26,7 @@ type BaseConfig struct {
|
|||
Enabled bool
|
||||
RunAtStart bool
|
||||
Schedule string
|
||||
NoSuccessNotice bool
|
||||
NoticeOnSuccess bool
|
||||
}
|
||||
|
||||
// OlderThanConfig represents a cron task with OlderThan setting
|
||||
|
@ -66,7 +66,7 @@ func (b *BaseConfig) DoRunAtStart() bool {
|
|||
|
||||
// DoNoticeOnSuccess returns whether a success notice should be posted
|
||||
func (b *BaseConfig) DoNoticeOnSuccess() bool {
|
||||
return !b.NoSuccessNotice
|
||||
return b.NoticeOnSuccess
|
||||
}
|
||||
|
||||
// FormatMessage returns a message for the task
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue