HomeSoftware Heritage

Return 0 slot if no more slots available in the queues

This commit no longer exists in the repository. It may have been part of a branch which was deleted.

Description

Return 0 slot if no more slots available in the queues

This scenario happens with the loader oneshot for example. This loader deals with more
than 1 type of origins to ingest in the same queue. So the computation of that function
returned negative value [1]. Which is ultimately not possible to execute in sql [1].

This commits fixes that behavior. This also explicits that the function must return
positive values in its docstring.

[1]

...
psycopg2.errors.InvalidRowCountInLimitClause: LIMIT must not be negative

Details

Provenance
ardumontAuthored on Oct 15 2021, 3:14 PM
ardumontPushed on Oct 15 2021, 3:49 PM
Differential Revision
D6487: Return 0 slot if no more slots available in the queues
Build Status
Buildable 24468
Build 38178: test-and-buildJenkins console · Jenkins

Commit No Longer Exists

This commit no longer exists in the repository.