Is there a way to stop/disable a Google Cloud Function?

前端 未结 5 960
無奈伤痛
無奈伤痛 2021-02-12 14:40

I have running multiple Google Cloud functions. One is not operating well, so I want to stop them until I\'ve fixed the situation.

I have seen that I can remove the func

5条回答
  •  说谎
    说谎 (楼主)
    2021-02-12 15:02

    Follow up for anyone else looking for this, I created an ENV variable and added an if check before my function executes. Ex:

    if os.environ['functionOn'] == 'true':
        # insert previous function code here
    

    Can change function on/off with ENV variable change from console + redeploy.

提交回复
热议问题