From 7c2d638f8a71f68dd4f3e0d7512b4f58af6f3937 Mon Sep 17 00:00:00 2001 From: Sebas Risco Date: Thu, 27 Sep 2018 14:29:37 +0200 Subject: [PATCH] Fix supervisor --- src/providers/onpremises/openfaas/function/supervisor.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/providers/onpremises/openfaas/function/supervisor.py b/src/providers/onpremises/openfaas/function/supervisor.py index 5b07c1e2..023c58e4 100644 --- a/src/providers/onpremises/openfaas/function/supervisor.py +++ b/src/providers/onpremises/openfaas/function/supervisor.py @@ -7,7 +7,7 @@ import subprocess from urllib.parse import unquote_plus -os_tmp_folder = tempfile.gettempdir() + "/" + get_temp_folder() +os_tmp_folder = tempfile.gettempdir() + "/" + str(uuid.uuid4().hex) output_folder = os_tmp_folder + "/output" def is_s3_event(event): @@ -69,9 +69,6 @@ def upload_file(bucket_name, file_path, file_key): # obj = boto3.resource('s3').Object(bucket_name, file_key) # obj.Acl().put(ACL='public-read') -def get_temp_folder(): - return str(uuid.uuid4().hex) - def is_key_and_value_in_dictionary(key, dictionary): return (key in dictionary) and dictionary[key] and dictionary[key] != ""