Added block-list command to enqueue a list of blocks from stdin
This commit is contained in:
committed by
Luke Van Seters
parent
4b93f95d50
commit
fa14caec17
11
cli.py
11
cli.py
@@ -1,6 +1,7 @@
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
import fileinput
|
||||
from datetime import datetime
|
||||
|
||||
import click
|
||||
@@ -102,6 +103,16 @@ async def inspect_many_blocks_command(
|
||||
before_block=before_block,
|
||||
)
|
||||
|
||||
@cli.command()
|
||||
def enqueue_block_list_command():
|
||||
from worker import ( # pylint: disable=import-outside-toplevel
|
||||
inspect_many_blocks_task,
|
||||
)
|
||||
|
||||
for block_string in fileinput.input():
|
||||
block = int(block_string)
|
||||
logger.info(f"Sending {block} to {block+1}")
|
||||
inspect_many_blocks_task.send(block, block+1)
|
||||
|
||||
@cli.command()
|
||||
@click.argument("start_block", type=int)
|
||||
|
||||
Reference in New Issue
Block a user