Skip to content

Feature: Add events to differentiate creations vs updates#1519

Open
tystuyfzand wants to merge 2 commits intoValour-Software:mainfrom
tystuyfzand:feature/create-events
Open

Feature: Add events to differentiate creations vs updates#1519
tystuyfzand wants to merge 2 commits intoValour-Software:mainfrom
tystuyfzand:feature/create-events

Conversation

@tystuyfzand
Copy link

Adds a new event suffix "Create" to planet models which can differentiate between items being created and just being updated, while (hopefully) maintaining compatibility by simply calling model.Sync by default.

This will make future hooks and bots able to specifically listen for creation events instead of having to differentiate between a model creation vs update by using the snowflake/timestamp/cache, allowing for better control over actions.

Note: I haven't been able to fully test this, and would appreciate anyone who has gotten Valour set up locally to help with this. I did some digging into the code to try to find hook locations, and it appears that it's only in the Node model, but that could be incorrect.

@tystuyfzand tystuyfzand requested a review from a team as a code owner March 7, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant