Lines 50-56
sub enqueue {
Link Here
|
50 |
$json_args = encode_json $job_args; |
50 |
$json_args = encode_json $job_args; |
51 |
|
51 |
|
52 |
my $conn = $self->connect; |
52 |
my $conn = $self->connect; |
53 |
$conn->send_with_receipt( { destination => $job_type, body => $json_args } ) |
53 |
# This namespace is wrong, it must be a vhost instead. |
|
|
54 |
# But to do so it needs to be created on the server => much more work when a new Koha instance is created. |
55 |
# Also, here we just want the Koha instance's name, but it's not in the config... |
56 |
# Picking a random id (memcached_namespace) from the config |
57 |
my $namespace = C4::Context->config('memcached_namespace'); |
58 |
$conn->send_with_receipt( { destination => sprintf("%s-%s", $namespace, $job_type), body => $json_args } ) |
54 |
or Koha::Exceptions::Exception->throw('Job has not been enqueued'); |
59 |
or Koha::Exceptions::Exception->throw('Job has not been enqueued'); |
55 |
} |
60 |
} |
56 |
); |
61 |
); |