Skip to content

Commit

Permalink
revert to no control
Browse files Browse the repository at this point in the history
  • Loading branch information
cauta committed May 10, 2024
1 parent 5fa301e commit af394e7
Showing 1 changed file with 28 additions and 24 deletions.
52 changes: 28 additions & 24 deletions app/apps/worker-service/src/worker-service.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,41 +27,45 @@ export class WorkerServiceController {

@EventPattern(TopicName.ETH_DETECTED_BLOCK)
async ethDetectBlock(data: any) {
await Promise.race([
this.ethereumWorker.ethHandleDetectedBlock(data),
this.delay(1000).then(() => {
return;
}),
]);
this.ethereumWorker.ethHandleDetectedBlock(data);
// await Promise.race([
// this.ethereumWorker.ethHandleDetectedBlock(data),
// this.delay(1000).then(() => {
// return;
// }),
// ]);
}

@EventPattern(TopicName.ETH_CONFIRMED_BLOCK)
async ethConfirmBlock(data: any) {
await Promise.race([
this.ethereumWorker.ethHandleConfirmedBlock(data),
this.delay(1000).then(() => {
return;
}),
]);
this.ethereumWorker.ethHandleConfirmedBlock(data);
// await Promise.race([
// this.ethereumWorker.ethHandleConfirmedBlock(data),
// this.delay(1000).then(() => {
// return;
// }),
// ]);
}

@EventPattern(TopicName.POLYGON_DETECTED_BLOCK)
async polygonDetectBlock(data: any) {
await Promise.race([
this.polygonWorker.ethHandleDetectedBlock(data),
this.delay(1000).then(() => {
return;
}),
]);
this.polygonWorker.ethHandleDetectedBlock(data);
// await Promise.race([
// this.polygonWorker.ethHandleDetectedBlock(data),
// this.delay(1000).then(() => {
// return;
// }),
// ]);
}

@EventPattern(TopicName.POLYGON_CONFIRMED_BLOCK)
async polygonConfirmBlock(data: any) {
await Promise.race([
this.polygonWorker.ethHandleConfirmedBlock(data),
this.delay(1000).then(() => {
return;
}),
]);
this.polygonWorker.ethHandleConfirmedBlock(data);
// await Promise.race([
// this.polygonWorker.ethHandleConfirmedBlock(data),
// this.delay(1000).then(() => {
// return;
// }),
// ]);
}
}

0 comments on commit af394e7

Please sign in to comment.