File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -36,8 +36,8 @@ def parse_and_upload(self, export_path):
36
36
Uploads to InfluxDB
37
37
"""
38
38
39
- def create_flusher (buffer , size , records ):
40
- def flusher ():
39
+ def create_flusher (buffer , size ):
40
+ def flusher (records ):
41
41
print ("Flushing {} points to DB. Current total: {}" .format (size , records ))
42
42
self .upload (buffer [:size ])
43
43
# clean up
@@ -51,7 +51,7 @@ def flusher():
51
51
52
52
point_buffer = []
53
53
total_records , success_records = (0 , 0 )
54
- flusher = create_flusher (point_buffer , self .buffer_size , total_records )
54
+ flusher = create_flusher (point_buffer , self .buffer_size )
55
55
56
56
for idx , (_ , record ) in enumerate (context ):
57
57
total_records += 1
@@ -64,7 +64,7 @@ def flusher():
64
64
output_mung_error (error , record , idx + 1 )
65
65
66
66
if len (point_buffer ) > self .buffer_size - 1 :
67
- flusher ()
67
+ flusher (total_records )
68
68
69
69
# memory cleanup
70
70
record .clear ()
You can’t perform that action at this time.
0 commit comments