Operations¶
INSPIRE operations manual.
Harvesting and Holding Pen¶
Handle records in error state¶
Via web interface¶
Visit Holding Pen list and filter for records in error state.
If any, you need to investigate why the record workflow failed, check the detailed page error report.
Sometimes the fix is simply to restart the task again if it is due to some circumstantial reasons.
You can do that from the interface by clicking the “current task” button and hit restart.
Via shell¶
- SSH into any worker machine (usually builder to avoid affecting the machines serving users)
- Enter the shell and retrieve all records in error state:
inspirehep shell
from invenio_workflows import workflow_object_class, ObjectStatus
errors = workflows_object_class.query(status=ObjectStatus.ERROR)
- Get a specific object:
from invenio_workflows import workflow_object_class
obj = workflow_object_class.get(1234)
obj.data # Check data
obj.extra_data # Check extra data
obj.status # Check status
obj.callback_pos # Position in current workflow
- See associated workflow definition:
from invenio_workflows import workflows
workflows[obj.workflow.name].workflow # Associated workflow list of tasks
- Manipulate position in the workflow
obj.callback_pos = [1, 2, 3]
obj.save()
- Restart workflow in various positions:
obj.restart_current() # Restart from current task and continue workflow
obj.restart_next() # Skip current task and continue workflow
obj.restart_previous() # Redo task before current one and continue workflow