@@ -86,15 +86,14 @@ def dwnld_insert_nutrition(mfp_username,mfp_password,ath_un,start_date,end_date,
86
86
date_in_range = single_date .strftime ("%Y-%m-%d" )
87
87
data_exist_for_date = 'Nutrition_Data_For_' + date_in_range
88
88
89
- #PG: Check whether the data for this date have been inserted into to DB during one of the previous runs
90
- if auto_synch == False :
91
- data_exists = check_data_file_exists (data_exist_for_date ,ath_un ,db_host ,db_name ,superuser_un ,superuser_pw ,encr_pass )
92
- if data_exists == True :
93
- with StdoutRedirection (ath_un ):
94
- print (('Nutrition data for {} already downloaded and inserted to DB. Skipping.' .format (date_in_range )))
95
- with ProgressStdoutRedirection (ath_un ):
96
- print (('Nutrition data for {} already downloaded and inserted to DB. Skipping.' .format (date_in_range )))
97
- continue
89
+ #PG: Check whether the data for this date have been inserted into to DB during one of the previous runs
90
+ data_exists = check_data_file_exists (data_exist_for_date ,ath_un ,db_host ,db_name ,superuser_un ,superuser_pw ,encr_pass )
91
+ if data_exists == True :
92
+ with StdoutRedirection (ath_un ):
93
+ print (('Nutrition data for {} already downloaded and inserted to DB. Skipping.' .format (date_in_range )))
94
+ with ProgressStdoutRedirection (ath_un ):
95
+ print (('Nutrition data for {} already downloaded and inserted to DB. Skipping.' .format (date_in_range )))
96
+ continue
98
97
99
98
with StdoutRedirection (ath_un ):
100
99
print (('Downloading nutrition data: ' + date_in_range ))
0 commit comments