Ignoring enqueued action with duplicate ID

Hi, I have an action that processes some incoming webhooks from another platform. For some updates, a few come in quick succession, so I want to ignore the duplicates. I have code that uses the "id" option of enqueue so that it blocks these subsequent duplicates from getting queued. However I am still getting messages in the log when this occurs (GGT_DUPLICATE_BACKGROUND_ACTION_ID: This background action can't be enqueued as its ID is already in use by another background action.). I have tried the onDuplicateID: "ignore" option, but it does not seem to have any affect? Is there any way to suppress this message? As it just seems wasteful.
2 Replies
Chocci_Milk
Chocci_Milk5w ago
Hello, I'm not aware of a way to suppress these warnings. Might I, however, suggest an alternative solution? This would require that you make a new model to track the webhooks that have arrived. You could use the upsert action to create/update a record of having seen the webhook/payload then only run the action code if particular fields have changed (record.changed/changes would help with that). Thoughts?
Gizmo
Gizmo4d ago
Do you like this answer? ​

Did you find this page helpful?