django_dramatiq
django_dramatiq copied to clipboard
ERROR: duplicate key value violates unique constraint "django_dramatiq_task_pkey"
In a fresh installation of django-dramatiq, I got the following error:
db_1 | 2021-05-30 06:48:15.094 UTC [59] ERROR: duplicate key value violates unique constraint "django_dramatiq_task_pkey"
db_1 | 2021-05-30 06:48:15.094 UTC [59] DETAIL: Key (id)=(f1381983-90c3-41ce-bf7f-4c781b8e5149) already exists.
db_1 | 2021-05-30 06:48:15.094 UTC [59] STATEMENT: INSERT INTO "django_dramatiq_task" ("id", "status", "created_at", "updated_at", "message_data", "actor_name", "queue_name") VALUES ('f1381983-90c3-41ce-bf7f-4c781b8e5149'::uuid, 'running', '2021-05-30T06:48:15.090606+00:00'::timestamptz, '2021-05-30T06:48:15.090622+00:00'::timestamptz, '\x7b2271756575655f6e616d65223a2264656661756c74222c226163746f725f6e616d65223a226765745f636974795f636f756e63696c5f75706461746573222c2261726773223a5b22323032312d30352d3237225d2c226b7761726773223a7b7d2c226f7074696f6e73223a7b22706970655f746172676574223a7b2271756575655f6e616d65223a2264656661756c74222c226163746f725f6e616d65223a22646973747269627574655f636974795f636f756e63696c5f6f626a656374735f746f5f73796e63222c2261726773223a5b5d2c226b7761726773223a7b7d2c226f7074696f6e73223a7b7d2c226d6573736167655f6964223a2237623063333262342d323530312d343466352d626161662d623264643631356166623164222c226d6573736167655f74696d657374616d70223a313632323335373239353037387d7d2c226d6573736167655f6964223a2266313338313938332d393063332d343163652d626637662d346337383162386535313439222c226d6573736167655f74696d657374616d70223a313632323335373239353037387d'::bytea, 'get_city_council_updates', 'default')
Version: 0.10.0 Broker: rabbitmq
@Bogdanp any idea about what might cause this error?
Noticed this on my Google cloud VM as well. Everything seems to be functioning as we would expect, just have a nice large 3.5m entry log file. I use the same back end (RabbitMQ).
happens for me as well when trying to do a message.get_result()
Have the same issue version: 0.11.5 broker: Redis
I assume that it might be because of 2 django nodes working in parallel.