Stop GCloud initilization early if service account key var not found#225
Stop GCloud initilization early if service account key var not found#225jonyTF merged 2 commits intoschej-it:mainfrom
Conversation
|
Yes. Local dev should not require Cloud Tasks credentials. One potential issue: while this change prevents startup failure, the rest of the gcloud layer still assumes TasksClient exists. CreateEmailTask and DeleteEmailTask dereference TasksClient unconditionally, and those paths are still reachable from event creation/edit flows. So in dev mode this may turn "fail at startup" into a nil-pointer exception when someone uses remindees. Maybe make CreateEmailTask / DeleteEmailTask safe no-ops when Cloud Tasks is unavailable, or |
|
Good call. I think safe no-ops are fine, probably with a console warning too so it's not just a silent failure. Will update this this evening :) Thanks! |
|
@jonyTF Looks good to me. |
This PR makes it so the GCloud initialization will return/end cleanly if the
SERVICE_ACCOUNT_KEY_PATHenv var is not set.The env var isn't required as Timeful can be used without an account. Making this optional simplifies local dev setup.