Commit ad4e1124 authored by Benjamin Graillot's avatar Benjamin Graillot

[gitlabissue] new source

parent 4671f332
import json
from flask import Flask, request
import source
app = Flask(__name__)
@app.route('/',methods=['POST'])
def foo():
try:
notif = request.data.decode('utf-8')
except:
notif = request.data
print(notif)
data = json.loads(notif)
print(data)
return "OK"
class GitlabIssue(source.Source):
def __init__(self):
source.Source.__init__(self, 'gitlabissue', 'gitlab.crans.org')
def loop(self, *args, **kwargs):
app.config['push_update'] = self.push_update
app.run(host='138.231.136.1' , port=5001)
......@@ -10,10 +10,11 @@ import news
import phabricator
import prometheus
import ml
import gitlabissue
MAIL_SOURCES = [wiki.Wiki(), phabricator.Phabricator(), ml.Ml(), github.Github()]
SOURCES = [source.MailSources(MAIL_SOURCES), news.News(), prometheus.Prometheus()]
SOURCES = [source.MailSources(MAIL_SOURCES), news.News(), prometheus.Prometheus(), gitlabissue.GitlabIssue()]
if __name__ == "__main__":
with open(config.socket_path, 'w') as fifo:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment