def run_deliveries(slogs, sa, run):
    chain_id = f'agorictest-{run.chain}'
    blocks = pd.concat((pd.read_csv(blockFile) for blockFile in (slogs / run.parent).glob('*-blocks.csv')))
    blocks = blocks[((blocks.line >= run.line) & (blocks.line < run.line_end))]
    blocks = blocks.assign(run=run.name)
    heights = blocks.blockHeight.unique()
    log.info('run %s %-3d blocks %.16s %s', run.name, len(heights), pd.to_datetime(run.time, unit='s'), run['name'])
    tot = 0
    for blockHeight in heights:
        detail = provide_deliveries(sa, blockHeight, run, blocks)
        if (not len(detail)):
            continue
        tot += len(detail)
        (yield detail)
    if (not tot):
        (yield no_deliveries.assign(file_id=(- 1), chain=(- 1), blockHeight=(- 1), run=run.name))
def run_deliveries(slogs, sa, run):
    chain_id = f'agorictest-{run.chain}'
    blocks = pd.concat((pd.read_csv(blockFile) for blockFile in (slogs / run.parent).glob('*-blocks.csv')))
    blocks = blocks[((blocks.line >= run.line) & (blocks.line < run.line_end))]
    blocks = blocks.assign(run=run.name)
    heights = blocks.blockHeight.unique()
    log.info('run %s %-3d blocks %.16s %s', run.name, len(heights), pd.to_datetime(run.time, unit='s'), run['name'])
    tot = 0
    for blockHeight in heights:
        detail = provide_deliveries(sa, blockHeight, run, blocks)
        if (not len(detail)):
            continue
        tot += len(detail)
        (yield detail)
    if (not tot):
        (yield no_deliveries.assign(file_id=(- 1), chain=(- 1), blockHeight=(- 1), run=run.name))