From 587ba83e663352ce623c2318dc94d4464a00816e Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Aug 08 2016 17:30:39 +0000 Subject: Add the logic allowing to set the different types of CI services supported If None are provided, pagure is considered as if it had CI disabled. --- diff --git a/pagure/lib/__init__.py b/pagure/lib/__init__.py index b092f0a..293f3c8 100644 --- a/pagure/lib/__init__.py +++ b/pagure/lib/__init__.py @@ -48,7 +48,7 @@ from pagure.lib import model REDIS = None - +PAGURE_CI = None def set_redis(host, port, db): """ Set the redis connection with the specified information. """ @@ -56,6 +56,10 @@ def set_redis(host, port, db): pool = redis.ConnectionPool(host=host, port=port, db=db) REDIS = redis.StrictRedis(connection_pool=pool) +def set_pagure_ci(services): + """ Set the list of CI services supported by this pagure instance. """ + PAGURE_CI = services + def __get_user(session, key): """ Searches for a user in the database for a given username or email.