Module: tools Branch: master Commit: 0b7251ba3119e1cf324eee4bab1fd72fa356331b URL: https://gitlab.winehq.org/winehq/tools/-/commit/0b7251ba3119e1cf324eee4bab1f...
Author: Jeremy White jwhite@codeweavers.com Date: Tue Jul 19 08:53:55 2022 -0500
gitlab: Add RUNNER_INTERVAL and RUNNER_COMMAND settings.
---
gitlab/gitlab-to-mail/example.cfg | 4 ++++ gitlab/gitlab-to-mail/util.py | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/gitlab/gitlab-to-mail/example.cfg b/gitlab/gitlab-to-mail/example.cfg index a0fc59d1..a4e4f238 100644 --- a/gitlab/gitlab-to-mail/example.cfg +++ b/gitlab/gitlab-to-mail/example.cfg @@ -37,3 +37,7 @@ INITIAL_BACKLOG_DAYS = 5
# How many patches to allow MAXIMUM_PATCHES = 50 + +# Configure runner.py behavior. A minimum delay of 30 seconds is enforced. +RUNNER_COMMAND = ./gitlabtomail.py +RUNNER_INTERVAL = 300 diff --git a/gitlab/gitlab-to-mail/util.py b/gitlab/gitlab-to-mail/util.py index 629b20c0..231e8e21 100644 --- a/gitlab/gitlab-to-mail/util.py +++ b/gitlab/gitlab-to-mail/util.py @@ -31,7 +31,7 @@ class Settings:
for s in ['DATABASE', 'GITLAB_TOKEN', 'GITLAB_URL', 'GITLAB_PROJECT_NAME', 'BRIDGE_FROM_EMAIL', 'BRIDGE_TO_EMAIL', 'BRIDGE_TAG', - 'SMTP_DOMAIN', 'SMTP_USER', 'SMTP_PASSWORD']: + 'SMTP_DOMAIN', 'SMTP_USER', 'SMTP_PASSWORD', 'RUNNER_COMMAND']: if s in self.cp['settings']: self.__dict__[s] = self.cp['settings'][s].strip('"') else: @@ -43,7 +43,8 @@ class Settings: else: self.__dict__[s] = None
- for s in ['GITLAB_PROJECT_ID', 'SMTP_PORT', 'INITIAL_BACKLOG_DAYS', 'MAXIMUM_PATCHES']: + for s in ['GITLAB_PROJECT_ID', 'SMTP_PORT', 'INITIAL_BACKLOG_DAYS', + 'MAXIMUM_PATCHES', 'RUNNER_INTERVAL']: if s in self.cp['settings']: self.__dict__[s] = self.cp['settings'].getint(s) else: