swh-scheduler API does not really support concurrency
See swh/meta$348
The problem is due to swh-scheduler not using a connection pool (as what is done in swh-storage), so there is no transaction isolation between concurrent requests (in a process).
swh-scheduler should be refactored to use the same db wrapper mecanism as swh-storage or swh-indexer/storage.
This is important because it makes (at least) the docker-env deployment pretty unstable.
Migrated from T1494 (view on Phabricator)