After formally introducing concurrent workers at the FastAPI level, primary key conflicts were observed in the computation task queue table.
| self._insert_jobs(cursor, feature_specification)
| File "/usr/local/lib/python3.11/site-packages/spatialprofilingtoolbox/ondemand/scheduler.py", line 82, in _insert_jobs
| cursor.execute(query)
| File "/usr/local/lib/python3.11/site-packages/psycopg/cursor.py", line 732, in execute
| raise ex.with_traceback(None)
| psycopg.errors.UniqueViolation: duplicate key value violates unique constraint "quantitative_feature_value_queue_pkey"
Fix this by removing the unused identifier column (and primary key constraint), introducing a whole row constraint, and converting INSERT to INSERT ON CONFLICT DO NOTHING.
After formally introducing concurrent workers at the FastAPI level, primary key conflicts were observed in the computation task queue table.
Fix this by removing the unused identifier column (and primary key constraint), introducing a whole row constraint, and converting
INSERT
toINSERT ON CONFLICT DO NOTHING
.