-
Notifications
You must be signed in to change notification settings - Fork 2
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
test #55
base: master
Are you sure you want to change the base?
test #55
Conversation
@@ -56,7 +64,19 @@ class FirebaseStepLogger extends BaseStepLogger { | |||
} | |||
|
|||
_reportLog(message) { | |||
this.stepRef.child('logs').push(message); | |||
this.calls++; | |||
this.stepRef.child('logs').push(message).then((err) => { |
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.
don't know if you can do: .then((err) =>... . I think if there is an error it will go to the catch
this.calls = 0; | ||
this.fullfilledCalls = 0; | ||
this.errorCalls = 0; | ||
this.on('finished', () => { |
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.
need to check whether this event for sure means that all logs flushed (I don't think it is related because it is invoked by the user from what I remember)
@@ -107,6 +127,10 @@ class FirebaseStepLogger extends BaseStepLogger { | |||
return new StepNameTransformStream(this.name); | |||
} | |||
|
|||
awaitLogsFlushed() { | |||
return this.compliationPromise; |
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.
This promise can only be resolved once. So because we don't want it to be resolved before the step is finished we need to create it only when the function is called.
No description provided.