Commit 91fa124c authored by Jonathan Schaeffer's avatar Jonathan Schaeffer
Browse files

Adding a forward to seedpsd

parent f63e3616
......@@ -2,7 +2,6 @@
# -*- coding: utf-8 -*-
import argparse
import itertools
import json
import logging
import os
......@@ -13,8 +12,8 @@ import traceback
from proton.utils import BlockingConnection
from proton import Message
import resif_pyinventory
from .resif_pyinventory import resif_pyinventory
SCRIPT_VERSION = 2021.190
......@@ -39,6 +38,9 @@ QUEUE_SEEDTREE_UPDATE_AGAIN = (
QUEUE_WFCATALOG_UPDATE = (
"wfcatalog-update" if RUNMODE == "production" else f"wfcatalog-update-{ RUNMODE }"
)
QUEUE_SEEDPSD_DATA = (
"seedpsd-data" if RUNMODE == "production" else f"seedpsd-data-{ RUNMODE }"
)
SEEDTREE_PATH = os.getenv("SEEDTREE_PATH")
......@@ -76,6 +78,13 @@ def validated_data_integrated_files(content):
logger.info("forwarding message to queue %s" % QUEUE_WFCATALOG_UPDATE)
sender.send(message)
# forward content to seedpsd-data queue. On message per line
sender = connection.create_sender(QUEUE_SEEDPSD_DATA)
logger.info("forwarding message to queue %s" % QUEUE_SEEDPSD_DATA)
for f in content.split('\n'):
message = Message(durable=True, body=f)
sender.send(message)
def seedtree(content):
"""
......
Supports Markdown
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