Skip to content

Commit

Permalink
fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverba137 committed Sep 25, 2024
1 parent 364bf34 commit 62d8cf1
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions py/specprodDB/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -1344,14 +1344,6 @@ def load_file(filepaths, tcls, hdu=1, row_filter=None, q3c=None, chunksize=50000
log.info("Row filter removed all data rows, skipping %s.", filepath)
continue
log.info("Row filter applied on %s; %d rows remain.", tn, good_rows.sum())
#
# Need to pass required arguments to convert, which depends on the table.
#
# if tn == 'ztile':
# convert_inputs['survey'] = 0
# convert_inputs['program'] = 0
# convert_inputs['tileid'] = 0
# convert_inputs['night'] = 0
orm_objects = tcls.convert(data, row_filter=good_rows)
log.info("Converted data to ORM objects on %s.", tn)
del data
Expand All @@ -1366,7 +1358,7 @@ def load_file(filepaths, tcls, hdu=1, row_filter=None, q3c=None, chunksize=50000
dbSession.add_all(data_chunk)
dbSession.commit()
log.info("Inserted %d rows in %s.",
min((k+1)*chunksize, finalrows), tn)
min((k+1)*chunksize, finalrows), tn)
else:
log.error("Detected empty data chunk in %s!", tn)
if q3c is not None:
Expand Down

0 comments on commit 62d8cf1

Please sign in to comment.