File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 68
68
## ...repeat for each job
69
69
#####################################################################
70
70
def write_data (chunk ):
71
- path = os .path .join (chunk [0 ], '' )
72
- job_name = chunk [1 ]
73
- header = chunk [2 ]
74
- rows = chunk [3 ]
71
+ new_path = os .path .join (chunk [0 ], '' )
72
+ new_job_name = chunk [1 ]
73
+ new_header = chunk [2 ]
74
+ new_rows = chunk [3 ]
75
75
num = multiprocessing .current_process ().name [16 :]
76
- filename = f'{ path } { job_name } .{ num } .csv.gz'
76
+ filename = f'{ new_path } { new_job_name } .{ num } .csv.gz'
77
77
if os .path .exists (filename ) is False :
78
78
with gzip .open (filename , 'at' , encoding = 'utf-8' , newline = '' ) as f :
79
79
csv_writer = csv .writer (f , quoting = csv .QUOTE_NONNUMERIC )
80
- csv_writer .writerows (header )
80
+ csv_writer .writerows (new_header )
81
81
with gzip .open (filename , 'at' , encoding = 'utf-8' , newline = '' ) as f :
82
82
csv_writer = csv .writer (f , quoting = csv .QUOTE_NONNUMERIC )
83
- csv_writer .writerows (rows )
83
+ csv_writer .writerows (new_rows )
84
84
85
85
86
86
# 1
You can’t perform that action at this time.
0 commit comments