WelcometoMyGarden / welcometomygarden

Web app of Welcome To My Garden, a not-for-profit network of citizens offering free camping spots in their gardens to slow travellers.
https://welcometomygarden.org
GNU Affero General Public License v3.0
107 stars 16 forks source link

Emulator hangs on a function call #306

Open th0rgall opened 1 year ago

th0rgall commented 1 year ago

I suspect the onWrite Firestore triggers are to blame, when they are running for 30+ second polling for SendGrid, together with the divergent FIFO behavior of of --inspect-functions:

--inspect-functions debug_port  Optional. Use with the Cloud Functions emulator to enable breakpoint debugging of functions at the specified port (or the default port 9229 if argument omitted). Note that when this flag is supplied, the Cloud Functions emulator switches to a special serialized execution mode in which functions are executed in a single process, in sequential (FIFO) order; this simplifies function debugging, though the behavior differs from multi-process, parallel execution of functions in the cloud.

Maybe we can check the Emulator REST API Enable / Disable Background Function Triggers docs & automate disabling these triggers for debugging flows where they are not