コード例 #1
0
def commit():
    receivedData = request.get_data().decode('utf-8')
    receivedData = receivedData.replace("\r\n","\n")
    print(receivedData);
    broker = RabbitMq(conf['broker']['simulator'])
    broker.publish(receivedData)
    return 'OK'
コード例 #2
0
def main():
    logger.info("Run githubImporter")
    args = checkParams()
    importer = GithubImporter(args.url, args.dateFormat, args.dest)
    importer.setBroker(RabbitMq(conf["broker"]))
    importer.setCallURL()
    importer.work()
    logger.info("End githubImporter")
コード例 #3
0
def main():
    logger.info("Run consumer")
    broker = RabbitMq(conf["broker"]['simulator'])
    broker.setBackend(MongoBackend(conf["mogoBackend"]))
    broker.consume()
    logger.info("End consumer")
コード例 #4
0
def main():
    logger.info("Run consumer")
    broker = RabbitMq(conf["broker"]["search"])
    broker.setBackend(ElasticBackend(conf["elasticBackend"]))
    broker.consume()
    logger.info("End consumer")