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

(-)a/Koha/BackgroundJob.pm (-4 / +9 lines)
Lines 101-108 sub enqueue { Link Here
101
    my $borrowernumber = C4::Context->userenv->{number}; # FIXME Handle non GUI calls
101
    my $borrowernumber = C4::Context->userenv->{number}; # FIXME Handle non GUI calls
102
    my $json_args = encode_json $job_args;
102
    my $json_args = encode_json $job_args;
103
103
104
    my $conn = $self->connect; # Ensure we can reach the server
105
106
    $self->set(
104
    $self->set(
107
        {
105
        {
108
            status         => 'new',
106
            status         => 'new',
Lines 115-122 sub enqueue { Link Here
115
    )->store;
113
    )->store;
116
114
117
    $job_args->{job_id} = $self->id;
115
    $job_args->{job_id} = $self->id;
118
    $json_args = encode_json $job_args;
119
116
117
    my $conn;
118
    try {
119
        $conn = $self->connect;
120
    } catch {
121
        warn "Cannot connect to broker " . $_;
122
    };
123
    return unless $conn;
124
125
    $json_args = encode_json $job_args;
120
    try {
126
    try {
121
        # This namespace is wrong, it must be a vhost instead.
127
        # This namespace is wrong, it must be a vhost instead.
122
        # But to do so it needs to be created on the server => much more work when a new Koha instance is created.
128
        # But to do so it needs to be created on the server => much more work when a new Koha instance is created.
123
- 

Return to bug 30172