Difference between revisions of "API:EPrints/DataObj/EventQueue"
(Created page with '<!-- Pod2Wiki=_preamble_ This page has been automatically generated from the EPrints 3.2 source. Any wiki changes made between the 'Pod2Wiki=*' and 'Edit below this comment' com…') |
(No difference)
|
Revision as of 09:57, 22 January 2013
EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects
Latest Source Code (3.4, 3.3) | Revision Log | Before editing this page please read Pod2Wiki
NAME
EPrints::DataObj::EventQueue - scheduler/indexer event queue
FIELDS
- eventqueueid
- Either a UUID or a hash of the event (if created with create_unique).
- cleanup
- If set to true removes this event once it has finished. Defaults to true.
- priority
- The priority for this event.
- start_time
- The event should not be executed before this time.
- end_time
- The event was last touched at this time.
- status
- The status of this event.
- userid
- The user (if any) that was responsible for creating this event.
- description
- A human-readable description of this event (or error).
- pluginid
- The EPrints::Plugin::Event plugin id to call to execute this event.
- action
- The name of the action to execute on the plugin (i.e. method name).
- params
- Parameters to pass to the action (a text serialisation).
METHODS
create_unique
$event = EPrints::DataObj::EventQueue->create_unique( $repo, $data [, $dataset ] )
Creates a unique event by setting the eventqueueid
to a hash of the pluginid
, action
and (if given) params
.
Returns undef if such an event already exists.
execute
$ok = $event->execute()
Execute the action this event describes.
The return from the EPrints::Plugin::Event plugin action is treated as:
undef - equivalent to HTTP_OK HTTP_OK - action succeeded, event is removed if cleanup is TRUE HTTP_RESET_CONTENT - action succeeded, event is set 'waiting' HTTP_NOT_FOUND - action failed, event is removed if cleanup is TRUE HTTP_LOCKED - action failed, event is re-scheduled for 10 minutes time HTTP_INTERNAL_SERVER_ERROR - action failed, event is 'failed' and kept
message
$event->message( $type, $xhtml )
Utility method to log a message for this event.
COPYRIGHT
- Copyright 2000-2011 University of Southampton.
- This file is part of EPrints http://www.eprints.org/.
- EPrints is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
- EPrints is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- You should have received a copy of the GNU Lesser General Public License along with EPrints. If not, see http://www.gnu.org/licenses/.