Make them flush their current state at regular interval sounds like a better behavior.
case in point.
The launchpad lister just failed after 6min of running and nothing got written in the listed_origins [1] with the error [2]
[1]
swhworker@worker0:~$ time SWH_CONFIG_FILENAME=/etc/softwareheritage/lister.yml swh lister run --lister launchpad incremental=TrueTraceback (most recent call last): File "/usr/lib/python3/dist-packages/swh/lister/pattern.py", line 123, in run full_stats.origins += self.send_origins(origins) File "/usr/lib/python3/dist-packages/swh/lister/pattern.py", line 224, in send_origins ret = self.scheduler.record_listed_origins(origins) File "/usr/lib/python3/dist-packages/swh/core/api/__init__.py", line 181, in meth_ return self.post(meth._endpoint_path, post_data) File "/usr/lib/python3/dist-packages/swh/core/api/__init__.py", line 278, in post return self._decode_response(response) File "/usr/lib/python3/dist-packages/swh/core/api/__init__.py", line 354, in _decode_response self.raise_for_status(response) File "/usr/lib/python3/dist-packages/swh/core/api/__init__.py", line 344, in raise_for_status raise exception from Noneswh.core.api.RemoteException: <RemoteException 500 CardinalityViolation: ['ON CONFLICT DO UPDATE command cannot affect row a second time\nHINT: Ensure that no rows proposed for insertion within the same command have duplicate constrainedvalues.\n']>... y = func(*args)TypeError: __init__() missing 1 required positional argument: 'tz_string'real 6m17.047suser 0m22.060ssys 0m0.644s