-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Fix system performance #5620
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
Fix system performance #5620
Conversation
|
||
if ($type == 'functions') { | ||
$this->message = 'Triggering a function on a function event is not allowed.'; | ||
return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is one approach.
Alternatively, we can remove the event from:
appwrite/app/config/events.php
Lines 195 to 236 in 0765aac
'functions' => [ | |
'$model' => Response::MODEL_FUNCTION, | |
'$resource' => true, | |
'$description' => 'This event triggers on any functions event.', | |
'deployments' => [ | |
'$model' => Response::MODEL_DEPLOYMENT, | |
'$resource' => true, | |
'$description' => 'This event triggers on any deployments event.', | |
'create' => [ | |
'$description' => 'This event triggers when a deployment is created.', | |
], | |
'delete' => [ | |
'$description' => 'This event triggers when a deployment is deleted.' | |
], | |
'update' => [ | |
'$description' => 'This event triggers when a deployment is updated.' | |
], | |
], | |
'executions' => [ | |
'$model' => Response::MODEL_EXECUTION, | |
'$resource' => true, | |
'$description' => 'This event triggers on any executions event.', | |
'create' => [ | |
'$description' => 'This event triggers when an execution is created.', | |
], | |
'delete' => [ | |
'$description' => 'This event triggers when an execution is deleted.' | |
], | |
'update' => [ | |
'$description' => 'This event triggers when an execution is updated.' | |
], | |
], | |
'create' => [ | |
'$description' => 'This event triggers when a function is created.' | |
], | |
'delete' => [ | |
'$description' => 'This event triggers when a function is deleted.', | |
], | |
'update' => [ | |
'$description' => 'This event triggers when a function is updated.', | |
] | |
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we remove the functions events from the events.php file we will also disable it for webhooks and realtime.
What does this PR do?
Test Plan
Tested adding a functions.* event
Related PRs and Issues
None
Checklist