Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to properly exit firebase-admin nodejs script when all transaction is completed

Is there anyway to check if all firebase transaction is completed in firebase-admin nodejs script, and properly disconnect from firebase and exit the nodejs script?

Currently, the firebase-admin nodejs script will just keep running even after all the transaction has been completed.

like image 802
Andrew See Avatar asked Jan 13 '17 08:01

Andrew See


1 Answers

If you're keeping track of all the promises and they complete successfully, what's happening is that the app is keeping a connection open, you can kill the app, by using:

app.delete()

For example if you used the default app you can do this:

firebase.app().delete()
like image 108
Dima Avatar answered Oct 09 '22 03:10

Dima