Lines 138-144
sub enqueue {
Link Here
|
138 |
# Picking a random id (memcached_namespace) from the config |
138 |
# Picking a random id (memcached_namespace) from the config |
139 |
my $namespace = C4::Context->config('memcached_namespace'); |
139 |
my $namespace = C4::Context->config('memcached_namespace'); |
140 |
my $encoded_args = Encode::encode_utf8( $json_args ); # FIXME We should better leave this to Net::Stomp? |
140 |
my $encoded_args = Encode::encode_utf8( $json_args ); # FIXME We should better leave this to Net::Stomp? |
141 |
$conn->send_with_receipt( { destination => sprintf("/queue/%s-%s", $namespace, $job_queue), body => $encoded_args } ) |
141 |
my $destination = sprintf( "/queue/%s-%s", $namespace, $job_queue ); |
|
|
142 |
$conn->send_with_receipt( { destination => $destination, body => $encoded_args, persistent => 'true' } ) |
142 |
or Koha::Exceptions::Exception->throw('Job has not been enqueued'); |
143 |
or Koha::Exceptions::Exception->throw('Job has not been enqueued'); |
143 |
} catch { |
144 |
} catch { |
144 |
$self->status('failed')->store; |
145 |
$self->status('failed')->store; |
145 |
- |
|
|