Change directory debug

This commit is contained in:
Yam ZhengLim
2022-09-26 18:47:03 +08:00
parent 6a19a4ee59
commit f0599562fb
+3 -6
View File
@@ -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