Skip to content
This repository was archived by the owner on Nov 14, 2022. It is now read-only.

Commit 1ae33e2

Browse files
author
Dimitar Tasev
authored
Merge pull request #1251 from ISISScientificComputing/minor_fixes
2 parents 2ca76c8 + f5fd14a commit 1ae33e2

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

model/message/message.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def populate(self, source, overwrite=True):
8383
# Set the value of the variable on this object accessing it by name
8484
setattr(self, key, value)
8585
else:
86-
raise ValueError("Unexpected key encountered during Message population: '{key}'.")
86+
raise ValueError(f"Unexpected key encountered during Message population: '{key}'.")
8787

8888
def validate(self, destination):
8989
"""

monitors/run_detection.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ def submit_run(self, summary_rb_number, run_number, file_name):
132132
rb_number=rb_number,
133133
run_number=run_number,
134134
data=file_path,
135+
facility="ISIS",
135136
started_by=0) # Autoreduction service code
136137
self.client.send('/queue/DataReady', message, priority='9')
137138
else:

utils/clients/queue_client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"""
1010
import logging
1111
import uuid
12+
import socket
1213

1314
import stomp
1415
from stomp.exception import ConnectFailedException
@@ -93,7 +94,7 @@ def subscribe_queues(self, queue_list, consumer_name, listener):
9394
for queue in queue_list:
9495
# prefetchSize limits the processing to 1 message at a time
9596
self._connection.subscribe(destination=queue,
96-
id=str(uuid.uuid4()),
97+
id=socket.gethostname(),
9798
ack="client-individual",
9899
header={'activemq.prefetchSize': '1'})
99100
self._logger.info("[%s] Subscribing to %s", consumer_name, queue)

0 commit comments

Comments
 (0)