From 09e0db880324cbf6ec1dd6d8c1d71a20d4df321d Mon Sep 17 00:00:00 2001 From: Simon Quigley Date: Wed, 27 May 2020 14:08:04 -0500 Subject: [PATCH] Fix race condition between job finishing and IRC notification being sent out. --- lugito/webhooks.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lugito/webhooks.py b/lugito/webhooks.py index b908306..963bcec 100644 --- a/lugito/webhooks.py +++ b/lugito/webhooks.py @@ -16,6 +16,7 @@ Lugito webhooks import logging import threading from flask import Flask, request +from time import sleep from lugito import Lugito from lugito.connectors import irc, launchpad, jenkins @@ -192,6 +193,8 @@ def jenkinstrigger(): def processjenkinsircnotify(request): """Process the request given so it can be daemonized""" + sleep(10) + # Get the status of the most recent build to the given project proj, status, link = jenkins_con.receive(request)