maintenance/importImages: Don't sleep after the last upload
authorSébastien Santoro <dereckson@espace-win.org>
Mon, 16 Jan 2017 15:14:34 +0000 (15:14 +0000)
committerJforrester <jforrester@wikimedia.org>
Mon, 16 Jan 2017 20:18:00 +0000 (20:18 +0000)
commit7840373fd3db32437498b9dda68cfcad44ac8226
treef8899f10bb41516769c0d46afe396cbb4db09433
parent38b0060dc4306291e0cd78acdf45a83d5324e5b3
maintenance/importImages: Don't sleep after the last upload

Currently, the importImages maintenance script offers an option
to sleep an arbitrary amount of seconds after each upload.

The current logic implementation had a side effect to also sleep
after the last image upload. This is not a desired behavior, as
the tasks are done and a clean exit with a report are welcome.

Instead, sleep will now occur before the second upload and the
ones to follow.

Change-Id: Ia675f210582c3075e9b59b002a00cb1fc4b44cac
maintenance/importImages.php