Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: add timeout options for export geth traces #376

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions ethereumetl/cli/export_geth_traces.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,15 @@
@click.option('-p', '--provider-uri', required=True, type=str,
help='The URI of the web3 provider e.g. '
'file://$HOME/Library/Ethereum/geth.ipc or http://localhost:8545/')
def export_geth_traces(start_block, end_block, batch_size, output, max_workers, provider_uri):
@click.option('-t', '--timeout', default=60, show_default=True, type=int, help='IPC or HTTP request timeout.')
def export_geth_traces(start_block, end_block, batch_size, output, max_workers, provider_uri, timeout=60):
"""Exports traces from geth node."""
job = ExportGethTracesJob(
start_block=start_block,
end_block=end_block,
batch_size=batch_size,
batch_web3_provider=ThreadLocalProxy(lambda: get_provider_from_uri(provider_uri, batch=True)),
batch_web3_provider=ThreadLocalProxy(
lambda: get_provider_from_uri(provider_uri, batch=True, timeout=timeout)),
max_workers=max_workers,
item_exporter=geth_traces_item_exporter(output))

Expand Down