Is there a way to stop / disable the Google cloud feature?

I have several features of Google Cloud. One of them does not work well, so I want to stop them until I correct the situation.

I saw that I can remove the function, but is there a way to disable it later; enable function?

+12
source share
4 answers

You cannot disable the function. Just comment on the function body. It would be nice to register the call in the console and then return null so that you can track whenever the function is called.

+4
source

I'm not sure if this is late, but what I did was that I deleted / commented out a function that I don't need and deployed again using firebase deployononly functions. After starting, it shows that the function is being deleted. Hope this helps Deploy GCF

+1
source

Do not export the function. Thus, you can still keep it unmodified and still be able to disable it.

+1
source

Keep track of everyone looking for this, I created an ENV variable and added an if check before executing my function. Example:

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

Can change the on / off function by changing the ENV variable from the console + redeployment.

0
source

Source: https://habr.com/ru/post/1267285/


All Articles