# All records from all repositories harvested. Check for any errors.
iferror_happened_p:
ifCFG_OAI_FAILED_HARVESTING_STOP_QUEUE==0or \
nottask_get_task_param("sleeptime")or \
error_happened_p>1:
# Admin want BibSched to stop, or the task is not set to
# run at a later date: we must stop the queue.
write_message("An error occurred. Task is configured to stop")
returnFalse
else:
# An error happened, but it can be recovered at next run
# (task is re-scheduled) and admin set BibSched to
# continue even after failure.
write_message("An error occurred, but task is configured to continue")
ifCFG_OAI_FAILED_HARVESTING_EMAILS_ADMIN:
try:
raiseInvenioOAIHarvestWarning("OAIHarvest (task #%s) failed at fully harvesting source(s) %s. BibSched has NOT been stopped, and OAIHarvest will try to recover at next run"%(task_get_task_param("task_id"),", ".join([repo['name']forrepoinreposlist]),))