max batch was inefficient: order destination files by source files while creating tasks

This commit is contained in:
Vincent Riquer 2013-10-08 12:40:38 +02:00
parent 472f966698
commit 34b31e5974

3
atom
View File

@ -479,7 +479,8 @@ echo '
WHERE CAST(destination_files.last_change AS TEXT)
<> CAST(source_files.last_change AS TEXT)
AND mime_type_actions.destination_id = destinations.id
AND mime_type_actions.action = 1' >&3
AND mime_type_actions.action = 1
ORDER BY source_files.id' >&3
(( maxbatch )) && echo "LIMIT $maxbatch" >&3
echo ';
SELECT "AtOM:NoMoreFiles";' >&3