Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

A trigger function used by many buckets in google cloud

I want to write an function which can be used by all the buckets and what lead to this situation is when have so many dirty data in the old bucket for testing I want to create an new one but I still want to keep the old bucket for testing like dev, test, staging environment purpose and so on. I currently have 3 buckets and they require the same onFinalize trigger. I don’t want to write the same function 3 times in my index.js file, is there any way to to do this ?

I did try to read the document but I have no found any possible solution to this situation

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

No, you have to deploy three different functions for three different buckets. Each bucket generates a different series of events. You are free to share the same implementation code among them though.

See also:

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading