We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For Diamond, we heard that we want to maybe use ActiveMQ from RabbitMQ.
For the ingestor, we need to swap the library we use, and were provided the following script:
from DLS_ResubmitterCore import DLS_ResubmitterCore from collections import deque from time import sleep import stomp import json class ScanListener(stomp.ConnectionListener): def __init__(self): self.messages = deque() def on_error(self, headers, message): print('received an error %s' % message) def on_message(self, headers, message): ob = json.loads(message) #if (ob["status"] == "STARTED"): if (ob["status"] == "COMPLETE"): self.messages.append(ob["filePath"]) submitterCore = DLS_ResubmitterCore() conn = stomp.Connection([("k11-control.diamond.ac.uk", 61613)]) scan_listener = ScanListener() conn.set_listener('', scan_listener) conn.start() conn.connect() conn.subscribe(destination='/topic/org.eclipse.scanning.status.topic', id=1, ack='auto') print("Autoprocessing listener activated") while True: if (scan_listener.messages): path = scan_listener.messages.popleft() try: submitterCore.ActiveMQdataProcessing(path) except: print('Failed to process file ' + path) sleep(1)
The text was updated successfully, but these errors were encountered:
close by #7
Sorry, something went wrong.
dylanmcreynolds
No branches or pull requests
For Diamond, we heard that we want to maybe use ActiveMQ from RabbitMQ.
For the ingestor, we need to swap the library we use, and were provided the following script:
The text was updated successfully, but these errors were encountered: