View | Details | Raw Unified | Return to bug 32242
Collapse All | Expand All

(-)a/Koha/BackgroundJob.pm (-2 / +2 lines)
Lines 137-143 sub enqueue { Link Here
137
        # Also, here we just want the Koha instance's name, but it's not in the config...
137
        # Also, here we just want the Koha instance's name, but it's not in the config...
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
        $conn->send_with_receipt( { destination => sprintf("/queue/%s-%s", $namespace, $job_queue), body => $json_args } )
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
          or Koha::Exceptions::Exception->throw('Job has not been enqueued');
142
          or Koha::Exceptions::Exception->throw('Job has not been enqueued');
142
    } catch {
143
    } catch {
143
        $self->status('failed')->store;
144
        $self->status('failed')->store;
144
- 

Return to bug 32242