message: indexer-service: Sync receipts to db in a timer eventual
diff: @@ -7,7 +7,7 @@ import {
  ReceiptStore,
  ReceiptsTransfer,
  } from '@graphprotocol/indexer-common'
  -import { Address, Logger, toAddress } from '@graphprotocol/common-ts'
  +import { Address, Logger, timer, toAddress } from '@graphprotocol/common-ts'
  import { Sequelize, Transaction, Model } from 'sequelize'
  import { RestServerNodeService } from '@connext/vector-utils'
  @@ -138,9 +138,7 @@ export class ReceiptManager {
  getTransfer(node, channelAddress, transferId, vectorTransferDefinition),
  )
  - // Sync to the database forever.
  - ;(async () => {
  - for (;;) {
  + timer(30_000).pipe(async () => {
  try {
  while (await this._flushOne());
  } catch (err) {
  @@ -149,11 +147,7 @@ export class ReceiptManager {
  { err },
  )
  }
  -
  - // Sleep 30 seconds
  - await new Promise(r => setTimeout(r, 30000))
  - }
  - })()
  + })
  }
  public static async create(
  