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