https://forge.softwareheritage.org/source/swh-scheduler.git
Revision 3aed7bf1cc114a874ecc86e87a2fb9df961b6773 authored by Antoine R. Dumont (@ardumont) on 15 October 2021, 13:14:12 UTC, committed by Antoine R. Dumont (@ardumont) on 15 October 2021, 13:22:52 UTC
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
```
1 parent ecc1400
History
Tip revision: 3aed7bf1cc114a874ecc86e87a2fb9df961b6773 authored by Antoine R. Dumont (@ardumont) on 15 October 2021, 13:14:12 UTC
Return 0 slot if no more slots available in the queues
Tip revision: 3aed7bf
File Mode Size
scheduler
__init__.py -rw-r--r-- 111 bytes

back to top