From f0599562fb591c21b9387d0e1a00c4406a272300 Mon Sep 17 00:00:00 2001 From: Yam ZhengLim Date: Mon, 26 Sep 2022 18:47:03 +0800 Subject: [PATCH] Change directory debug --- main.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/main.py b/main.py index e3b9e1c..fa4eb76 100644 --- a/main.py +++ b/main.py @@ -38,17 +38,14 @@ def exchange_load_to_cloudstorage(EXCHANGE_CSV_TEMP_STORAGE_PATH): file_path = os.path.join(dirpath,file_name) ex_load_func.upload_to_bucket(ex_storage_client, file_name, file_path) -def print_check_directory(): +def linux_change_cron_directory(): script_dir = os.path.dirname(os.path.realpath(__file__)) print (os.getcwd()) - print(script_dir) os.chdir(script_dir) - print (os.getcwd()) def main(): - #### CHECK DIRECTORY #### - print_check_directory() - ########################### + #Make sure cron in the file directory + linux_change_cron_directory() #Extract Load Exchange Data, and delete the temp csv