mirror of
https://github.com/codez0mb1e/resistance.git
synced 2024-11-22 02:12:19 +00:00
Processing exceptions
This commit is contained in:
parent
3882efc9a2
commit
28450cdeab
@ -133,7 +133,11 @@ for pair in usd_pairs:
|
|||||||
|
|
||||||
print(f'INFO | {pair} > Starting insert to DB...')
|
print(f'INFO | {pair} > Starting insert to DB...')
|
||||||
print('DEBUG | {} rows from {} to {}'.format(df.shape[0], min(df['time']), max(df['time'])))
|
print('DEBUG | {} rows from {} to {}'.format(df.shape[0], min(df['time']), max(df['time'])))
|
||||||
|
try:
|
||||||
db_conn.insert(df, 'crypto', db_mapping)
|
db_conn.insert(df, 'crypto', db_mapping)
|
||||||
|
except Exception as ex:
|
||||||
|
print(f'ERROR | {pair} > {ex}')
|
||||||
|
|
||||||
else:
|
else:
|
||||||
print(f'WARN | {pair} > No new records')
|
print(f'WARN | {pair} > No new records')
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user