diff options
Diffstat (limited to 'modules/setting/setting.go')
-rw-r--r-- | modules/setting/setting.go | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go index 2f64511a12..35c9165139 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -53,6 +53,10 @@ var ( CookieUserName string CookieRememberName string + // Webhook settings. + WebhookTaskInterval int + WebhookDeliverTimeout int + // Repository settings. RepoRootPath string ScriptType string @@ -187,9 +191,9 @@ var Service struct { RequireSignInView bool EnableCacheAvatar bool NotifyMail bool + LdapAuth bool ActiveCodeLives int ResetPwdCodeLives int - LdapAuth bool } func newService() { @@ -390,6 +394,11 @@ func newNotifyMailService() { log.Info("Notify Mail Service Enabled") } +func newWebhookService() { + WebhookTaskInterval = Cfg.MustInt("webhook", "TASK_INTERVAL", 1) + WebhookDeliverTimeout = Cfg.MustInt("webhook", "DELIVER_TIMEOUT", 5) +} + func NewServices() { newService() newLogService() @@ -398,4 +407,5 @@ func NewServices() { newMailService() newRegisterMailService() newNotifyMailService() + newWebhookService() } |