Skip to content

Commit

Permalink
ajustado tempo espera
Browse files Browse the repository at this point in the history
  • Loading branch information
royopa committed Sep 29, 2020
1 parent 85e1503 commit 40e2b00
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions importa_arquivo.py
Expand Up @@ -75,6 +75,10 @@ def main():
scraperwiki.sqlite.save(
unique_keys=['dt_referencia', 'co_ativo'], data=row)

if index > 0 and index % 1500 == 0:
print('Aguarda 30 segundos para não dar lock na base')
time.sleep(30)

print('{} Registros importados com sucesso'.format(len(df)))


Expand Down

0 comments on commit 40e2b00

Please sign in to comment.