Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preload hooks for delete case and task #619

Open
wants to merge 31 commits into
base: develop
Choose a base branch
from

Conversation

Vladimir-A
Copy link
Contributor

Small fixes for correct work on_preload_task_delete and on_preload_case_delete hooks.
There are problems with registering hooks. Need iris-webhooks-module update FIX

tvandenabbeel-spotit and others added 30 commits October 4, 2024 08:50
Fix reference to POSTGRES_USER variable in postgres template for kubernetes
Change reference POSTGRES_USER kubernetes template
@Vladimir-A Vladimir-A changed the base branch from master to develop November 18, 2024 01:48
@Vladimir-A Vladimir-A changed the base branch from develop to master November 18, 2024 01:50
task = get_task_with_assignees(task_id=cur_id, case_id=caseid)
if not task:
return response_error("Invalid task ID for this case")
call_modules_hook('on_preload_task_delete', data=task, caseid=caseid)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe then we should update all preload deletions to work with a dump of the object? Normally preload hooks are only working with raw data, nothing from the DB, to avoid any conflicts.
I was acutally thinking of removing all preload in future versions. Do you have any use cases where working with preload instead of postload?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In our case, there is no difference between preload and postload. We need to track the deletion of cases and tasks. Since postload works after the deletion of object and it is impossible to process a non-existent object with a webhook module, so I tried to restore the correct operation of preload, of course we need information about the object in the output to work with it.

@whikernel whikernel changed the base branch from master to develop December 1, 2024 18:00
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.

3 participants