Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.

Conversation

@DieMyst
Copy link
Contributor

@DieMyst DieMyst commented Feb 24, 2021

No description provided.

@DieMyst DieMyst requested review from coder11 and folex February 24, 2021 09:16
@DieMyst DieMyst self-assigned this Feb 24, 2021
await this.handleParticle(particle).catch((err) => {
log.error('particle processing failed: ' + err);
const _this = this;
return new Promise(function (resolve, reject) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use arrow function here. That way you won't need _this


return new Promise<T>((resolve, reject) => {
const prFetch = new Promise<T>(async (resolve, reject) => {
this.fetchParticles.set(callBackId, { resolve, reject });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we can drop this fetch line completely. Public fetch api works differently (see api.ts file)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's just a little bit of legacy left after FOSDEM preparations

this.strategy.sendParticleFurther(newParticle);
}

if (stepperOutcome.ret_code == 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can probably write something like this stepperOutcome.ret_code == 0 && resolve

@DieMyst DieMyst merged commit 3eacf70 into master Feb 24, 2021
@DieMyst DieMyst deleted the handle-error branch February 24, 2021 11:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants