Skip to content

Commit

Permalink
LIMS-1487: Fix alphafold triggering (#866)
Browse files Browse the repository at this point in the history
Co-authored-by: Mark Williams <[email protected]>
  • Loading branch information
ndg63276 and Mark Williams authored Dec 16, 2024
1 parent c373c3c commit 506408e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
12 changes: 6 additions & 6 deletions api/config_sample.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,12 @@
$enabled_container_types = array();

# Zocalo message broker credentials - Set to empty string to disable
$zocalo_server = 'tcp://activemq.server.ac.uk';
$zocalo_username = 'foo';
$zocalo_password = 'bar';

# Primary Zocalo entry point for recipe submission
$zocalo_mx_reprocess_queue = '/queue/zocolo.name';
$rabbitmq_zocalo_host = 'rabbitmq.server.ac.uk';
$rabbitmq_zocalo_port = 5672;
$rabbitmq_zocalo_username = 'foo';
$rabbitmq_zocalo_password = 'bar';
$rabbitmq_zocalo_vhost = 'zocalo';
$rabbitmq_zocalo_routing_key = 'processing_recipe';

# This is used to trigger Zocalo recipes on adding new Protein sequences
# Set to empty string to disable
Expand Down
7 changes: 3 additions & 4 deletions api/src/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -1093,9 +1093,9 @@ function get_visit_processed_dir($dc, $location)

function _submit_zocalo_recipe($recipe, $parameters, $error_code = 500)
{
global $zocalo_mx_reprocess_queue;
global $rabbitmq_zocalo_vhost;

if (isset($zocalo_mx_reprocess_queue))
if (isset($rabbitmq_zocalo_vhost))
{
// Send job to processing queue
$zocalo_message = array(
Expand All @@ -1104,7 +1104,7 @@ function _submit_zocalo_recipe($recipe, $parameters, $error_code = 500)
),
'parameters' => $parameters,
);
$this->_send_zocalo_message($zocalo_mx_reprocess_queue, $zocalo_message, $error_code);
$this->_send_zocalo_message($rabbitmq_zocalo_vhost, $zocalo_message, $error_code);
}
}

Expand All @@ -1130,7 +1130,6 @@ function _send_zocalo_message($rabbitmq_zocalo_vhost, $zocalo_message, $error_co

try
{
error_log("Sending message" . var_export($zocalo_message, true));
$queue = new Queue($rabbitmq_zocalo_host, $rabbitmq_zocalo_port, $rabbitmq_zocalo_username, $rabbitmq_zocalo_password, $rabbitmq_zocalo_vhost);
$queue->send($zocalo_message, $rabbitmq_zocalo_routing_key);
}
Expand Down

0 comments on commit 506408e

Please sign in to comment.