summaryrefslogtreecommitdiffstats
path: root/modules/setting
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-06-08 04:45:34 -0400
committerUnknown <joe2010xtmf@163.com>2014-06-08 04:45:34 -0400
commit302c863cda651130286838309d3d897cace93534 (patch)
treebc2b5e8efd513304806e1e900141856d3adfce48 /modules/setting
parenta0318db2f9094eda2beea19ed323244b4ae30831 (diff)
downloadgitea-302c863cda651130286838309d3d897cace93534.tar.gz
gitea-302c863cda651130286838309d3d897cace93534.zip
Fix #242
Diffstat (limited to 'modules/setting')
-rw-r--r--modules/setting/setting.go12
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()
}