#[Solved] Set the events in function
5 messages · Page 1 of 1 (latest)
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