Skip to content

Commit

Permalink
Merge pull request #12 from Bugazelle/dev
Browse files Browse the repository at this point in the history
[Feat] Release v0.1.16
  • Loading branch information
Bugazelle authored Jul 27, 2019
2 parents bd9c0df + 945f88a commit f2ea320
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/ExportCsvToInflux/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.1.15'
__version__ = '0.1.16'
7 changes: 4 additions & 3 deletions src/ExportCsvToInflux/exporter_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,8 @@ def export_csv_to_influx(self,
break

# Check the timestamp, and generate the csv with checksum
csv_base_name = os.path.basename(csv_file_item)
new_csv_file = '{0}_influx.csv'.format(csv_base_name.replace('.csv', ''))
new_csv_file = os.path.join(current_dir, new_csv_file)
# csv_base_name = os.path.basename(csv_file_item)
new_csv_file = '{0}_influx.csv'.format(csv_file_item.replace('.csv', ''))
new_csv_file_exists = os.path.exists(new_csv_file)
no_new_data_status = False
if new_csv_file_exists:
Expand All @@ -275,6 +274,8 @@ def export_csv_to_influx(self,
data = [{'md5': [csv_file_md5] * csv_file_length}]
if time_column_exists is False:
modified_time = csv_object.get_file_modify_time(csv_file_item)
field_columns.append('timestamp')
tag_columns.append('timestamp')
data.append({time_column: [modified_time] * csv_file_length})
csv_object.add_columns_to_csv(file_name=csv_file_item, target=new_csv_file, data=data)

Expand Down

0 comments on commit f2ea320

Please sign in to comment.