Skip to content
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

Merged
merged 2 commits into from
Apr 1, 2024

Conversation

dragosp1011
Copy link
Contributor

@github-actions github-actions bot added package: wallet/backend Wallet backend implementations type: source Source changes package: boutique/backend Boutique backend implementations labels Mar 28, 2024
await start(app)
await app.processResources()
} catch (e) {
console.log('Error on starting the app')
Copy link
Contributor

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?

Copy link
Contributor Author

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
Copy link
Member

@beniaminmunteanu beniaminmunteanu Mar 29, 2024

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?

Copy link
Contributor Author

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

Copy link
Contributor Author

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

@dragosp1011 dragosp1011 merged commit f800371 into main Apr 1, 2024
9 checks passed
@dragosp1011 dragosp1011 deleted the start-app-errors branch April 1, 2024 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: boutique/backend Boutique backend implementations package: wallet/backend Wallet backend implementations type: source Source changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Background jobs are started despite application not being ready
3 participants