Skip to content

Commit

Permalink
fix[avas]:filter data into files
Browse files Browse the repository at this point in the history
  • Loading branch information
fishTsai20 committed Jan 29, 2024
1 parent 228286e commit 0f0f1ac
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions blockchainetl/jobs/exporters/indexer_item_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ def export_items(self, items):
f"Finished write. Total items processed: {write_rows}. "
f"Took {str(duration)}."
)

self.call_go()
self.close()
self.call_go()
self.files.clear()

def convert_items(self, items, table):
columns = [column.name for column in table.columns]
Expand All @@ -70,15 +70,14 @@ def convert_items(self, items, table):
def close(self):
for file in self.files.values():
file.close()
self.files.clear()

def call_go(self):
start_time = datetime.now()
go_program = os.environ.get('GO_PROGRAM_PATH', './indexer')

command = [go_program, '--transactions', self.files["transaction"].name,
'--logs',
self.files["log"].name]
self.files["log"].name, '--rerun true']

try:
result = subprocess.run(command, check=True, stdout=subprocess.PIPE,
Expand Down

0 comments on commit 0f0f1ac

Please sign in to comment.