Parse task_ids before calling set_status_tasks.
So errors on the CLI side do not trigger an exception on the server, such as https://sentry.softwareheritage.org/share/issue/396669f829d148c09ec3a313df905fd4/ (I assume it was called from the CLI, because it's the only way to pass it more than one argument)
Migrated from D5560 (view on Phabricator)