Compare commits
No commits in common. "485f1c7f50427fd8bb1585fc90910d62f10148b9" and "a3e80e9416f74205d5956db1fd1e2cf063b57437" have entirely different histories.
485f1c7f50
...
a3e80e9416
@ -153,13 +153,13 @@ decodeFile() {
|
|||||||
done
|
done
|
||||||
)
|
)
|
||||||
status 0
|
status 0
|
||||||
cleanup $tmpfile.wav
|
|
||||||
EOInsert
|
EOInsert
|
||||||
)
|
)
|
||||||
progressSpin
|
progressSpin
|
||||||
fi
|
fi
|
||||||
if (( sox_needed ))
|
if (( sox_needed ))
|
||||||
then
|
then
|
||||||
|
cleanup="$tempdir/$tmpfile"
|
||||||
decodeSox "$tempdir/$tmpfile.wav"
|
decodeSox "$tempdir/$tmpfile.wav"
|
||||||
if ! soxtaskid=$(
|
if ! soxtaskid=$(
|
||||||
Select tasks id <<<"key = $tmpfile"
|
Select tasks id <<<"key = $tmpfile"
|
||||||
@ -183,7 +183,7 @@ decodeFile() {
|
|||||||
)
|
)
|
||||||
requires $decodetaskid
|
requires $decodetaskid
|
||||||
status 0
|
status 0
|
||||||
cleanup $tmpfile.wav
|
cleanup $cleanup
|
||||||
EOInsert
|
EOInsert
|
||||||
)
|
)
|
||||||
progressSpin
|
progressSpin
|
||||||
|
|||||||
@ -65,6 +65,7 @@ encodeFile::mp3() {
|
|||||||
echo "cmd_arg$key $cleanedopts"
|
echo "cmd_arg$key $cleanedopts"
|
||||||
done
|
done
|
||||||
)
|
)
|
||||||
|
cleanup $tempdir/$tmpfile.wav
|
||||||
source_file $fileid
|
source_file $fileid
|
||||||
status 0
|
status 0
|
||||||
rename_pattern ${destinationrenamepath[$destination]}/${destinationrename[$destination]}
|
rename_pattern ${destinationrenamepath[$destination]}/${destinationrename[$destination]}
|
||||||
|
|||||||
@ -33,6 +33,7 @@ encodeFile::opus() {
|
|||||||
echo "cmd_arg$key $cleanedopts"
|
echo "cmd_arg$key $cleanedopts"
|
||||||
done
|
done
|
||||||
)
|
)
|
||||||
|
cleanup $tempdir/$tmpfile.wav
|
||||||
source_file $fileid
|
source_file $fileid
|
||||||
status 0
|
status 0
|
||||||
rename_pattern ${destinationrenamepath[$destination]}/${destinationrename[$destination]}
|
rename_pattern ${destinationrenamepath[$destination]}/${destinationrename[$destination]}
|
||||||
|
|||||||
@ -29,6 +29,7 @@ encodeFile::vorbis() {
|
|||||||
echo "cmd_arg$key ${oggencopts[key]}"
|
echo "cmd_arg$key ${oggencopts[key]}"
|
||||||
done
|
done
|
||||||
)
|
)
|
||||||
|
cleanup $tempdir/$tmpfile.wav
|
||||||
source_file $fileid
|
source_file $fileid
|
||||||
status 0
|
status 0
|
||||||
rename_pattern ${destinationrenamepath[$destination]}/${destinationrename[$destination]}
|
rename_pattern ${destinationrenamepath[$destination]}/${destinationrename[$destination]}
|
||||||
|
|||||||
@ -44,13 +44,13 @@ cleaner() {
|
|||||||
" FROM tasks" \
|
" FROM tasks" \
|
||||||
" WHERE id=$taskid" \
|
" WHERE id=$taskid" \
|
||||||
" )," \
|
" )," \
|
||||||
" fat32compat=(" \
|
" fat32compat=(" \
|
||||||
" SELECT fat32compat" \
|
" SELECT fat32compat" \
|
||||||
" FROM tasks" \
|
" FROM tasks" \
|
||||||
" WHERE id=$taskid" \
|
" WHERE id=$taskid" \
|
||||||
" )," \
|
" )," \
|
||||||
" ascii=(" \
|
" ascii=(" \
|
||||||
" SELECT ascii" \
|
" SELECT ascii" \
|
||||||
" FROM tasks" \
|
" FROM tasks" \
|
||||||
" WHERE id=$taskid" \
|
" WHERE id=$taskid" \
|
||||||
" )" \
|
" )" \
|
||||||
@ -60,12 +60,9 @@ cleaner() {
|
|||||||
count=$(Select tasks required_by <<<"id = $taskid")
|
count=$(Select tasks required_by <<<"id = $taskid")
|
||||||
if (( count == 0 ))
|
if (( count == 0 ))
|
||||||
then
|
then
|
||||||
[[ -n "$cleanup" ]] && rm -f "$tempdir/$cleanup"
|
rm -f "$cleanup"
|
||||||
Delete tasks <<<"id = $taskid"
|
|
||||||
unset finishedtasks[key]
|
|
||||||
else
|
|
||||||
Update tasks status 4 \
|
|
||||||
<<<"id = $taskid"
|
|
||||||
fi
|
fi
|
||||||
|
Delete tasks <<<"id = $taskid"
|
||||||
|
unset finishedtasks[key]
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,112 +8,7 @@ master() {
|
|||||||
SELECT COUNT(*)
|
SELECT COUNT(*)
|
||||||
FROM tasks
|
FROM tasks
|
||||||
WHERE status = 0;
|
WHERE status = 0;
|
||||||
'>&3
|
|
||||||
|
|
||||||
read -u4 remaining
|
|
||||||
if (( remaining == 0 ))
|
|
||||||
then
|
|
||||||
sleep 0.1
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo '
|
|
||||||
SELECT COUNT(*)
|
|
||||||
FROM tasks
|
|
||||||
WHERE status = 0
|
|
||||||
AND requires IN (
|
|
||||||
SELECT id
|
|
||||||
FROM tasks
|
|
||||||
WHERE status = 4
|
|
||||||
);
|
|
||||||
|
|
||||||
SELECT
|
|
||||||
id,
|
|
||||||
source_file,
|
|
||||||
cmd_arg0,
|
|
||||||
cmd_arg1,
|
|
||||||
cmd_arg2,
|
|
||||||
cmd_arg3,
|
|
||||||
cmd_arg4,
|
|
||||||
cmd_arg5,
|
|
||||||
cmd_arg6,
|
|
||||||
cmd_arg7,
|
|
||||||
cmd_arg8,
|
|
||||||
cmd_arg9,
|
|
||||||
cmd_arg10,
|
|
||||||
cmd_arg11,
|
|
||||||
cmd_arg12,
|
|
||||||
cmd_arg13,
|
|
||||||
cmd_arg14,
|
|
||||||
cmd_arg15,
|
|
||||||
cmd_arg16,
|
|
||||||
cmd_arg17,
|
|
||||||
cmd_arg18,
|
|
||||||
cmd_arg19,
|
|
||||||
cmd_arg20,
|
|
||||||
cmd_arg21,
|
|
||||||
cmd_arg22,
|
|
||||||
cmd_arg23,
|
|
||||||
cmd_arg24,
|
|
||||||
cmd_arg25,
|
|
||||||
cmd_arg26,
|
|
||||||
cmd_arg27,
|
|
||||||
cmd_arg28,
|
|
||||||
cmd_arg29,
|
|
||||||
cmd_arg30,
|
|
||||||
cmd_arg31,
|
|
||||||
cmd_arg32,
|
|
||||||
cmd_arg33,
|
|
||||||
cmd_arg34,
|
|
||||||
cmd_arg35,
|
|
||||||
cmd_arg36,
|
|
||||||
cmd_arg37,
|
|
||||||
cmd_arg38,
|
|
||||||
cmd_arg39,
|
|
||||||
cmd_arg40,
|
|
||||||
cmd_arg41,
|
|
||||||
cmd_arg42,
|
|
||||||
cmd_arg43,
|
|
||||||
cmd_arg44,
|
|
||||||
cmd_arg45,
|
|
||||||
cmd_arg46,
|
|
||||||
cmd_arg47,
|
|
||||||
cmd_arg48,
|
|
||||||
cmd_arg49,
|
|
||||||
cmd_arg50,
|
|
||||||
cmd_arg51,
|
|
||||||
cmd_arg52,
|
|
||||||
cmd_arg53,
|
|
||||||
cmd_arg54,
|
|
||||||
cmd_arg55,
|
|
||||||
cmd_arg56,
|
|
||||||
cmd_arg57,
|
|
||||||
cmd_arg58,
|
|
||||||
cmd_arg59,
|
|
||||||
cleanup,
|
|
||||||
fileid,
|
|
||||||
filename
|
|
||||||
FROM tasks
|
|
||||||
WHERE status = 0
|
|
||||||
AND requires IN (
|
|
||||||
SELECT id
|
|
||||||
FROM tasks
|
|
||||||
WHERE status = 4
|
|
||||||
ORDER BY source_file
|
|
||||||
/* LIMIT 1 */
|
|
||||||
)
|
|
||||||
ORDER BY source_file
|
|
||||||
LIMIT 1;
|
|
||||||
'>&3
|
|
||||||
|
|
||||||
read -u4 ready
|
|
||||||
if (( ready > 0 ))
|
|
||||||
then
|
|
||||||
createworker
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo '
|
|
||||||
SELECT COUNT(*)
|
SELECT COUNT(*)
|
||||||
FROM tasks
|
FROM tasks
|
||||||
WHERE status = 0
|
WHERE status = 0
|
||||||
@ -191,12 +86,15 @@ master() {
|
|||||||
ORDER BY source_file
|
ORDER BY source_file
|
||||||
LIMIT 1;
|
LIMIT 1;
|
||||||
' >&3
|
' >&3
|
||||||
|
read -u4 remaining
|
||||||
read -u4 ready
|
read -u4 ready
|
||||||
|
if (( remaining == 0 ))
|
||||||
if (( active == 0 && ready == 0 ))
|
|
||||||
then
|
then
|
||||||
dumpfile="$tempdir/tasks-$(date -Iseconds).csv"
|
sleep 0.1
|
||||||
|
return 0
|
||||||
|
elif (( active == 0 && ready == 0 ))
|
||||||
|
then
|
||||||
|
dumpfile="$tmpdir/tasks-$(date -Iseconds).csv"
|
||||||
cat <<-EOF
|
cat <<-EOF
|
||||||
|
|
||||||
|
|
||||||
@ -212,7 +110,6 @@ master() {
|
|||||||
.mode list
|
.mode list
|
||||||
.headers off
|
.headers off
|
||||||
.output stdout
|
.output stdout
|
||||||
COMMIT;
|
|
||||||
EOSQL
|
EOSQL
|
||||||
closeDatabase
|
closeDatabase
|
||||||
echo "Waiting for children to come back home..."
|
echo "Waiting for children to come back home..."
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user