Skip to content

Commit

Permalink
kitodo_production_task_action: only call logret if action did complet…
Browse files Browse the repository at this point in the history
…e the job
  • Loading branch information
bertsky committed Jul 9, 2023
1 parent 039567a commit 717196d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ocrd_lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -241,21 +241,25 @@ post_process_to_mets() {
kitodo_production_task_action() {
ACTION=""
MESSAGE="${2}"
JOBCOMPLETE=0
case ${1} in
1)
ACTION="COMMENT"
;;
2)
ACTION="ERROR_OPEN"
JOBCOMPLETE=1
;;
3)
ACTION="ERROR_CLOSE"
JOBCOMPLETE=1
;;
4)
ACTION="PROCESS"
;;
5)
ACTION="CLOSE"
JOBCOMPLETE=1
;;
*)
logger -p user.error -t $TASK "Unknown task action type"
Expand All @@ -268,8 +272,10 @@ kitodo_production_task_action() {
elif test "$ACTION" == "CLOSE"; then
java -Dlog4j2.configurationFile=$ACTIVEMQ_CLIENT_LOG4J2 -jar "$ACTIVEMQ_CLIENT" "tcp://$ACTIVEMQ?closeAsync=false" "$ACTIVEMQ_CLIENT_QUEUE" $TASK_ID "$MESSAGE"
fi
if ((JOBCOMPLETE)); then
logret # communicate retval 0
fi
fi
logret # communicate retval 0
}

kitodo_production_task_action_comment() {
Expand Down

0 comments on commit 717196d

Please sign in to comment.