New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Firestore: component_provider.ts: cleanup terminate() functions #7906
Firestore: component_provider.ts: cleanup terminate() functions #7906
Conversation
|
…hen Firestore is terminated
Size Report 1Affected Products
Test Logs |
Size Analysis Report 1Affected Products
Test Logs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR makes a few tiny code improvements to the
terminate()
functions incomponent_provider.ts
:if
blocks checking for and object being null with more concise null chaining (i.e. the?.
operator).await
from function calls that simply returnvoid
, which make theawait
superfluous and potentially confusing.indexBackfillerScheduler?.stop()
, just like howgcScheduler?.stop()
is called. This doesn't really affect anything because the scheduled job is cancelled by virtue of the AsyncQueue being shut down, but it's probably best not to rely on that implementation detail of the scheduler.