Johnson
Johnson

Reputation: 330

How to terminate already triggered Firebase Cloud Function?

I deployed a Firebase Cloud Function that automatically resize images when images are uploaded to the bucket. It will then upload the resized versions to the bucket as well.

However I made a mistake in not checking for already resized images. So the resized images also triggered the function.

This function ran overnight and now there is too many triggered functions uploading to the bucket. Since the original function creates 12 images each time it ran, the number of triggers explode exponentially.

I have tried:

  1. Renaming the function then re-deploy.
  2. Deleting the function from Firebase.

However, since the functions were already triggered. Doing these didn't help.

Is there a way to stop these already triggered functions? Thank you very much for your help.

Upvotes: 2

Views: 635

Answers (1)

Doug Stevenson
Doug Stevenson

Reputation: 317322

You can delete a deployed function in the Cloud Console. Use the overflow menu to the right of the function.

You can also simply use the Firebase CLI to deploy again, but without your function exported. It will be removed if not defined.

Upvotes: 4

Related Questions