This commit is contained in:
Gui Heise 2022-02-01 12:17:54 -05:00
parent f6d5ca1179
commit e01de19e73
2 changed files with 28 additions and 21 deletions

45
mev
View File

@ -95,25 +95,32 @@ case "$1" in
esac esac
;; ;;
export) export)
shift shift
case "$1" in case "$1" in
s3-export) s3-export)
block_number=$2 block_number=$2
bucket=$3 bucket=$3
filepath=$4 filepath=$4
region=$5 region=$5
echo "Exporting block" echo "Exporting block"
kubectl exec -ti deploy/mev-inspect -- poetry run s3-export $block_number $bucket $filepath $region kubectl exec -ti deploy/mev-inspect -- \
;; poetry run s3-export $block_number $bucket $filepath $region
s3-export-many)
after_block=$2 ;;
before_block=$3 s3-export-many)
bucket=$4 after_block=$2
filepath_base=$5 before_block=$3
region=$6 bucket=$4
echo "Exporting blocks" filepath_base=$5
kubectl exec -ti deploy/mev-inspect -- poetry run s3-export-many $after_block $before_block $bucket $filepath_base $region region=$6
;; echo "Exporting blocks"
kubectl exec -ti deploy/mev-inspect -- \
poetry run s3-export-many $after_block $before_block $bucket $filepath_base $region
;;
*)
echo "export usage: "$1" {s3-export}"
exit 1
esac
;; ;;
exec) exec)
shift shift

View File

@ -40,8 +40,8 @@ enqueue-many-blocks = 'cli:enqueue_many_blocks_command'
fetch-block = 'cli:fetch_block_command' fetch-block = 'cli:fetch_block_command'
fetch-all-prices = 'cli:fetch_all_prices' fetch-all-prices = 'cli:fetch_all_prices'
fetch-range = 'cli:fetch_range' fetch-range = 'cli:fetch_range'
s3-export = 'cli:s3_export' s3-export = 'cli:s3_export_command'
s3-export-many = 'cli:s3_export_many' s3-export-many = 'cli:s3_export_many_command'
[tool.black] [tool.black]
exclude = ''' exclude = '''