performance improvement: ingest data directly from tmp file

This commit is contained in:
2020-11-24 10:04:21 +01:00
parent 11beda5432
commit 08111e0d69
3 changed files with 14 additions and 45 deletions

View File

@@ -216,13 +216,12 @@ def send_csv(zip, file_in_zip, csvSettings):
'settings': ('csvReaderSettings.json', csvSettings , 'application/json')
})
r = requests.post('http://localhost:17333/api/data?waitUntilFinished=true', data=m,
r = requests.post('http://localhost:17333/api/data', data=m,
headers={
'Accept': 'text/plain, application/json, application/*+json, */*',
'Content-Type': m.content_type.replace("form-data", "mixed;charset=UTF-8")
})
print("response:")
print(r)
print("response: %s" % r)
finally:
shutil.rmtree(tmp_folder)