EPrints Technical Mailing List Archive
Message: #05726
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
[EP-tech] Event Queue 'Bug' ?
- To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>
- Subject: [EP-tech] Event Queue 'Bug' ?
- From: "Alan.Stiles" <alan.stiles@open.ac.uk>
- Date: Mon, 23 May 2016 10:46:03 +0000
Having been playing around with event queue stuff over the last week or so, I think I’ve found an issue. In
https://github.com/eprints/eprints/blob/3.3/perl_lib/EPrints/DataObj/EventQueue.pm#L290 through to 296 it appears to be trying to assign the eval error message (i.e. a ’die’ message from an event function) to the description field of the event queue, but
this was never appearing in the database. After playing around with some debug messages it appears as though the $@ variable is getting reset, probably in the call to $self->message on line 293 (for the indexer log), so has no value when it gets passed to
the set_value on 294. By amending it as follows I’ve now got a somewhat useful and visible message in the Event Queue against the failed job. Does anyone think this is a bad / good idea? Should I raise it as an issue or even commit the fix? 290: my $rc = eval { $plugin->$action( @params ) }; 291: if( $@ ) 292: { +++ my $eval_error = $@; # save the value of the eval error message 293: $self->message( "error", $xml->create_text_node( "Error during execution: $@" ) ); 294: --- $self->set_value( "description", $@ ); +++ 294: $self->set_value( “description”, $eval_error ); 295: return EPrints::Const::HTTP_INTERNAL_SERVER_ERROR; 296 } Cheers, Alan Stiles Digital Repository Developer Library Services, The Open University |
- Prev by Date: [EP-tech] SOLVED: OAI-Harvest with "from-until"
- Next by Date: Re: [EP-tech] Thomson Reuters API/PHP
- Previous by thread: [EP-tech] SOLVED: OAI-Harvest with "from-until"
- Next by thread: [EP-tech] 'Interesting' requests for OAI endpoints
- Index(es):