Skip to content
New issue

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

LIMS-1487: Fix alphafold triggering #866

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading