4
0

fixed tempfile creation
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Pünkösd Marcell 2020-04-30 00:30:15 +02:00
parent 836ca1b58d
commit 4c14d5d37c

View File

@ -55,7 +55,7 @@ def run_everything(parameters: dict):
tag = parameters['tag'] tag = parameters['tag']
logging.info(f"Downloading sample: {tag}") logging.info(f"Downloading sample: {tag}")
_, file_path = tempfile.mktemp(prefix=f"{tag}_", suffix=".wav", dir="extractor-service") file_path = tempfile.mktemp(prefix=f"{tag}_", suffix=".wav", dir="extractor-service")
r = requests.get(f"http://storage-service/object/{tag}") r = requests.get(f"http://storage-service/object/{tag}")
with open(file_path, 'wb') as f: with open(file_path, 'wb') as f:
f.write(r.content) f.write(r.content)