-
Notifications
You must be signed in to change notification settings - Fork 21
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
fix: start background processing only if the app started #1253
Conversation
await start(app) | ||
await app.processResources() | ||
} catch (e) { | ||
console.log('Error on starting the app') |
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.
should we leave in console 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.
yes, the app is not initialised on this step yet
@@ -132,7 +132,7 @@ export class App { | |||
.catch((err) => { | |||
logger.error('Error while trying to process pending payments') | |||
logger.error(err) | |||
return true | |||
return false |
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.
why is the return needed at all?
Is it so that the else branch gets executed in the following .then?
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.
yes, to setup the next execution
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.
with returning true, it was going inside the if with immediate execution and flooding the app with errors
Context
Changes