Whenever I redeploy my specific function, the event list I previously set up for it always gets deleted. Is this a bug, or is it intended to delete all the setup?
You should put the event list on your appwrite.json to avoid that
For example, I will copy here one of my functions:
{
"$id": "conteo_registros",
"name": "CONTEO_REGISTROS",
"runtime": "python-3.9",
"path": "functions/CONTEO_REGISTROS",
"entrypoint": "src/index.py",
"ignore": [
"__pypackages__"
],
"execute": [],
"events": [
"databases.*.collections.*.documents.*.create",
"databases.*.collections.*.documents.*.delete"
],
"schedule": "",
"timeout": 15,
"variables": {
"ENDPOINT_API": "xxx",
"PROJECT_ID": "xxx",
"DB_ID": "xxx",
"COLLECTION_MD_ID": "xxx",
"API_KEY": "xxx"
}
I hope it helps you
ohh Thank you sir
Also remember whenever you deploy a new function, you should deploy it twice.
this way env will be updated (idk why that happens).
You are always welcome
[Solved] Set the events in function
Recommended threads
- Appwrite-injected variables are not avai...
I am using rust-1.83 as a runtime and try to access APPWRITE_FUNCTION_API_ENDPOINT or APPWRITE_FUNCTION_API_KEY during runtime. Both are not set during my execu...
- Appwrite (Dart SDK) (for package_info_pl...
Hi team! Many Flutter plugins now need package_info_plus 10.x and device_info_plus 13.x, but appwrite 25.4.0 still constrains package_info_plus: >=8.0.2 <10.0...
- Functions in cloud console not works
please advise as all of my runing functions on Appwrite console was working before , but now it give this error [Invalid `headers` param: Value must be a valid...