Run a fetch/sync upon starting the service

Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
Pierre-Yves Chibon 2020-05-03 21:21:52 +02:00
parent ebd553f405
commit 3951266e79

View file

@ -12,7 +12,7 @@ import subprocess
import sys
import time
from fedora_messaging import api, config
from fedora_messaging import api, config, message
_log = logging.getLogger("mirror_from_pagure_bus")
@ -72,6 +72,11 @@ class MirrorFromPagure(object):
_log.info("Ready to consume and trigger on %s", self.trigger_names)
msg = message.Message
msg.topic = "io.pagure.prod.pagure.git.receive"
msg.body = {"repo": {"fullname": self.trigger_names[0]}}
self.__call__(message=msg)
def __call__(self, message, cnt=0):
"""
Invoked when a message is received by the consumer.