ayon-backend icon indicating copy to clipboard operation
ayon-backend copied to clipboard

Events: Reusable events

Open martastain opened this issue 7 months ago • 1 comments

Story

When a new event is dispatched and the provided hash already exists, the endpoint returns constraint violation error. In some cases, with deterministic hashes, it would be useful to allow reusing existing events - this is now done using boilerplate code and checking for existing hashes.

Problems

Boilerplate code is needed to accommodate this functionality

Proposal

Add reuse=true flag to [POST] /api/events. If that is provided and conflicting hash is found, instead of creating a new event, the original one will be updated (description, summary, payload, status...) and its id returned.

martastain avatar Jul 17 '24 09:07 martastain