Skip to content

Commit

Permalink
fix: processing a block events in one db transcation
Browse files Browse the repository at this point in the history
  • Loading branch information
metmirr committed Sep 8, 2020
1 parent da50c2d commit 691d37f
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,9 @@ export default class MappingsProcessor {

async _onQueryEventBlock(query_event_block: SubstrateEventEntity[]): Promise<void> {
//debug(`Yay, block producer at height: #${query_event_block.block_number.toString()}`);
await asyncForEach(query_event_block, async (event: SubstrateEventEntity) => {
await doInTransaction(async (queryRunner: QueryRunner) => {

await doInTransaction(async (queryRunner: QueryRunner) => {
await asyncForEach(query_event_block, async (event: SubstrateEventEntity) => {

debug(`Processing event ${event.name},
id: ${event.id}`)

Expand Down

0 comments on commit 691d37f

Please sign in to comment.