PPSS passess the test case...

This commit is contained in:
Louwrentius 2010-07-17 21:19:31 +00:00
parent c4bc6f963a
commit 7550b4a5c1
1 changed files with 5 additions and 9 deletions

10
ppss
View File

@ -1631,8 +1631,6 @@ remove_processed_items_from_input_file () {
fi fi
INPUTFILES=`list_all_input_items` INPUTFILES=`list_all_input_items`
log DEBUG "->> $INPUTFILES"
log DEBUG "-<< $PROCESSED_ITEMS"
oldIFS=$IFS # save the field separator oldIFS=$IFS # save the field separator
IFS=$'\n' # new field separator, the end of line IFS=$'\n' # new field separator, the end of line
@ -2128,7 +2126,7 @@ run_command () {
log DEBUG "Current active workers is $ACTIVE_WORKERS" log DEBUG "Current active workers is $ACTIVE_WORKERS"
if [ "$ACTIVE_WORKERS" -le "$MAX_NO_OF_RUNNING_JOBS" ] if [ "$ACTIVE_WORKERS" -lt "$MAX_NO_OF_RUNNING_JOBS" ]
then then
if [ -z "$INPUT" ] if [ -z "$INPUT" ]
then then
@ -2150,7 +2148,7 @@ run_command () {
return 1 return 1
fi fi
else else
log DEBUG "Strange, this message should never be displaed." log DEBUG "Maximum number of workers are bussy, no more additional workers..."
fi fi
} }
@ -2338,10 +2336,9 @@ listen_for_job () {
do do
log DEBUG "Current active workers is $ACTIVE_WORKERS" log DEBUG "Current active workers is $ACTIVE_WORKERS"
decrease_active_workers
if [ "$event" = "$START_KEY" ] if [ "$event" = "$START_KEY" ]
then then
decrease_active_workers
log DEBUG "Got a 'start-key' event" log DEBUG "Got a 'start-key' event"
if [ "$DAEMON" = "0" ] if [ "$DAEMON" = "0" ]
@ -2361,7 +2358,6 @@ listen_for_job () {
fi fi
else else
log DEBUG "Daemon mode: a worker finished..." log DEBUG "Daemon mode: a worker finished..."
decrease_active_workers
run_command run_command
fi fi