mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-05-31 13:00:41 +08:00
fix
This commit is contained in:
@@ -258,6 +258,12 @@ var (
|
||||
Action: PolicyActionUpdate,
|
||||
Result: rbacutils.Allow,
|
||||
},
|
||||
{
|
||||
Service: "notify",
|
||||
Resource: "contacts",
|
||||
Action: PolicyActionList,
|
||||
Result: rbacutils.Allow,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -24,10 +24,10 @@ type NotifyOption struct {
|
||||
|
||||
DingtalkEnabled bool `help:"Enable dingtalk"`
|
||||
SocketFileDir string `help:"Socket file directory" default:"/etc/yunion/notify"`
|
||||
UpdateInterval int `help:"Update send services interval(unit:s)" default:30`
|
||||
UpdateInterval int `help:"Update send services interval(unit:s)" default:"30"`
|
||||
VerifyEmailUrl string `help:"url of verify email"`
|
||||
ReSendScope int `help:"Resend all messages that have not been sent successfully within ReSendScope minutes"`
|
||||
InitNotificationScope int `help:"initialize data of notification with in InitNotificationScope hours" default:100`
|
||||
InitNotificationScope int `help:"initialize data of notification with in InitNotificationScope hours" default:"100"`
|
||||
}
|
||||
|
||||
var Options NotifyOption
|
||||
|
||||
@@ -63,7 +63,7 @@ func StartService() {
|
||||
models.NotifyService.InitAll()
|
||||
defer models.NotifyService.StopAll()
|
||||
|
||||
cron := cronman.GetCronJobManager()
|
||||
cron := cronman.InitCronJobManager(true, 2)
|
||||
// update service
|
||||
cron.AddJobAtIntervals("UpdateServices", time.Duration(opts.UpdateInterval)*time.Second, models.NotifyService.UpdateServices)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user