mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-05 03:38:12 +08:00
Add polling_interval to config
This will be used by ridad. Signed-off-by: Petr Šabata <contyk@redhat.com>
This commit is contained in:
@@ -7,6 +7,10 @@ db = sqlite:///rida.db
|
||||
pdc = http://pdc.stg.fedoraproject.org/
|
||||
scmurls = ["git://pkgs.stg.fedoraproject.org/modules/"]
|
||||
|
||||
# How often should we resort to polling, in seconds
|
||||
# Set to zero to disable polling
|
||||
polling_interval = 60
|
||||
|
||||
rpms_default_repository = git://pkgs.fedoraproject.org/rpms/
|
||||
rpms_allow_repository = False
|
||||
rpms_default_cache = http://pkgs.fedoraproject.org/repo/pkgs/
|
||||
|
||||
@@ -79,8 +79,9 @@ class Config(object):
|
||||
self._messaging = ""
|
||||
self._db = ""
|
||||
self._pdc = ""
|
||||
self._polling_interval = 0
|
||||
self._koji_config = None
|
||||
self._koji_profile = None
|
||||
self._koji_profile = None
|
||||
self._koji_arches = None
|
||||
self._rpms_default_repository = ""
|
||||
self._rpms_allow_repository = False
|
||||
@@ -136,6 +137,19 @@ class Config(object):
|
||||
def pdc(self, s):
|
||||
self._pdc = str(s)
|
||||
|
||||
@property
|
||||
def polling_interval(self):
|
||||
"""Polling interval, in seconds."""
|
||||
return self._polling_interval
|
||||
|
||||
@polling_interval.setter
|
||||
def polling_interval(self, i):
|
||||
if not isinstance(i, int):
|
||||
raise TypeError("polling_interval needs to be an int")
|
||||
if i < 0:
|
||||
raise ValueError("polling_interval must be >= 0")
|
||||
self._polling_interval = i
|
||||
|
||||
@property
|
||||
def koji_config(self):
|
||||
"""Koji URL."""
|
||||
@@ -154,7 +168,7 @@ class Config(object):
|
||||
@koji_profile.setter
|
||||
def koji_profile(self, s):
|
||||
self._koji_profile = str(s)
|
||||
|
||||
|
||||
@property
|
||||
def koji_arches(self):
|
||||
"""Koji architectures."""
|
||||
|
||||
Reference in New Issue
Block a user