typesense / firestore-typesense-search

Firebase Extension to automatically push Firestore documents to Typesense for full-text search with typo tolerance, faceting, and more
https://extensions.dev/extensions/typesense/firestore-typesense-search
Apache License 2.0
159 stars 35 forks source link

run admin.initializeApp globally #5

Closed kylewill closed 3 years ago

kylewill commented 3 years ago

Run admin.initializeApp() on load to prevent multiple invocations in the event user runs backfill multiple times while a function instance is still active.

Change Summary

Executes admin.initializeApp() only once per function instance to avoid multiple invocation error.

PR Checklist

jasonbosco commented 3 years ago

Thanks @kylewill!