Skip to content

Commit 1cac4a5

Browse files
committed
Download today's wellness data
An update to allow for current day's (incomplete day) wellness data to be downloaded. Previously the download would end with yesterdays (complete) data
1 parent ead2272 commit 1cac4a5

7 files changed

+89
-444
lines changed

src/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ RUN apt-get install -y wget
2121
# Download and Install chrome
2222
RUN wget -q https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
2323
RUN apt-get install -y ./google-chrome-stable_current_amd64.deb
24+
# Check chrome version
25+
RUN echo "Chrome: " && google-chrome --version
2426
# Download and Install chromedriver. The version here depends on what what version of chrome gets installed above !
25-
RUN wget https://chromedriver.storage.googleapis.com/104.0.5112.79/chromedriver_linux64.zip
27+
RUN wget https://chromedriver.storage.googleapis.com/105.0.5195.52/chromedriver_linux64.zip
2628
RUN unzip chromedriver_linux64.zip
2729
RUN mv chromedriver /usr/bin/chromedriver
2830
RUN chown root:root /usr/bin/chromedriver

src/athletedataapp_apache.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ def index():
546546
with StdoutRedirection(ath_un):
547547
print(gc_fit_well_progress)
548548
time.sleep(1)
549-
gc.dwnld_insert_fit_wellness(ath_un, gc_agent,start_date,end_date,gc_username, gc_password, mfp_username, output, db_host, db_name, superuser_un,superuser_pw, archive_to_dropbox,archive_radio,dbx_auth_token,encr_pass)
549+
gc.dwnld_insert_fit_wellness(ath_un, gc_agent,start_date,end_date_today,gc_username, gc_password, mfp_username, output, db_host, db_name, superuser_un,superuser_pw, archive_to_dropbox,archive_radio,dbx_auth_token,encr_pass)
550550
gc_fit_well_progress = 'GC FIT wellness data downloaded successfully'
551551
with StdoutRedirection(ath_un):
552552
print(gc_fit_well_progress)
@@ -570,8 +570,8 @@ def index():
570570
with StdoutRedirection(ath_un):
571571
print(gc_json_well_progress)
572572
time.sleep(1)
573-
gc.dwnld_insert_json_wellness(ath_un, gc_agent, start_date, end_date, gc_username, gc_password, mfp_username, display_name, output, db_host, db_name, superuser_un,superuser_pw, archive_to_dropbox,archive_radio,dbx_auth_token,encr_pass)
574-
gc.dwnld_insert_json_body_composition(ath_un, gc_agent, start_date, end_date, gc_username, gc_password, mfp_username, output, db_host, db_name, superuser_un,superuser_pw, archive_to_dropbox, archive_radio, dbx_auth_token,encr_pass)
573+
gc.dwnld_insert_json_wellness(ath_un, gc_agent, start_date, end_date_today, gc_username, gc_password, mfp_username, display_name, output, db_host, db_name, superuser_un,superuser_pw, archive_to_dropbox,archive_radio,dbx_auth_token,encr_pass)
574+
gc.dwnld_insert_json_body_composition(ath_un, gc_agent, start_date, end_date_today, gc_username, gc_password, mfp_username, output, db_host, db_name, superuser_un,superuser_pw, archive_to_dropbox, archive_radio, dbx_auth_token,encr_pass)
575575
gc_json_well_progress = 'GC JSON wellness data downloaded successfully'
576576
with StdoutRedirection(ath_un):
577577
print(gc_json_well_progress)
@@ -595,7 +595,7 @@ def index():
595595
with StdoutRedirection(ath_un):
596596
print(gc_json_dailysum_progress)
597597
time.sleep(1)
598-
gc.dwnld_insert_json_dailysummary(ath_un,gc_agent, start_date, end_date, gc_username, gc_password, mfp_username, display_name, output, db_host, db_name, superuser_un,superuser_pw, archive_to_dropbox,archive_radio,dbx_auth_token,encr_pass)
598+
gc.dwnld_insert_json_dailysummary(ath_un,gc_agent, start_date, end_date_today, gc_username, gc_password, mfp_username, display_name, output, db_host, db_name, superuser_un,superuser_pw, archive_to_dropbox,archive_radio,dbx_auth_token,encr_pass)
599599
gc_json_dailysum_progress = 'GC JSON daily summary data downloaded successfully'
600600
with StdoutRedirection(ath_un):
601601
print(gc_json_dailysum_progress)
@@ -646,7 +646,7 @@ def index():
646646
with StdoutRedirection(ath_un):
647647
print(mfp_progress)
648648
time.sleep(1)
649-
mfp.dwnld_insert_nutrition(mfp_username,mfp_password,ath_un,start_date,end_date,encr_pass,save_pwd,auto_synch,db_host,superuser_un,superuser_pw)
649+
mfp.dwnld_insert_nutrition(mfp_username,mfp_password,ath_un,start_date,end_date_today,encr_pass,save_pwd,auto_synch,db_host,superuser_un,superuser_pw)
650650
mfp_progress = 'MFP nutrition data downloaded successfully'
651651
with StdoutRedirection(ath_un):
652652
print(mfp_progress)

src/athletedataapp_flask.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ def index():
542542
with StdoutRedirection(ath_un):
543543
print(gc_fit_well_progress)
544544
time.sleep(1)
545-
gc.dwnld_insert_fit_wellness(ath_un, gc_agent,start_date,end_date,gc_username, gc_password, mfp_username, output, db_host, db_name, superuser_un,superuser_pw, archive_to_dropbox,archive_radio,dbx_auth_token,encr_pass)
545+
gc.dwnld_insert_fit_wellness(ath_un, gc_agent,start_date,end_date_today,gc_username, gc_password, mfp_username, output, db_host, db_name, superuser_un,superuser_pw, archive_to_dropbox,archive_radio,dbx_auth_token,encr_pass)
546546
gc_fit_well_progress = 'GC FIT wellness data downloaded successfully'
547547
with StdoutRedirection(ath_un):
548548
print(gc_fit_well_progress)
@@ -566,8 +566,8 @@ def index():
566566
with StdoutRedirection(ath_un):
567567
print(gc_json_well_progress)
568568
time.sleep(1)
569-
gc.dwnld_insert_json_wellness(ath_un, gc_agent, start_date, end_date, gc_username, gc_password, mfp_username, display_name, output, db_host, db_name, superuser_un,superuser_pw, archive_to_dropbox,archive_radio,dbx_auth_token,encr_pass)
570-
gc.dwnld_insert_json_body_composition(ath_un, gc_agent, start_date, end_date, gc_username, gc_password, mfp_username, output, db_host, db_name, superuser_un,superuser_pw, archive_to_dropbox, archive_radio, dbx_auth_token,encr_pass)
569+
gc.dwnld_insert_json_wellness(ath_un, gc_agent, start_date, end_date_today, gc_username, gc_password, mfp_username, display_name, output, db_host, db_name, superuser_un,superuser_pw, archive_to_dropbox,archive_radio,dbx_auth_token,encr_pass)
570+
gc.dwnld_insert_json_body_composition(ath_un, gc_agent, start_date, end_date_today, gc_username, gc_password, mfp_username, output, db_host, db_name, superuser_un,superuser_pw, archive_to_dropbox, archive_radio, dbx_auth_token,encr_pass)
571571
gc_json_well_progress = 'GC JSON wellness data downloaded successfully'
572572
with StdoutRedirection(ath_un):
573573
print(gc_json_well_progress)
@@ -591,7 +591,7 @@ def index():
591591
with StdoutRedirection(ath_un):
592592
print(gc_json_dailysum_progress)
593593
time.sleep(1)
594-
gc.dwnld_insert_json_dailysummary(ath_un,gc_agent, start_date, end_date, gc_username, gc_password, mfp_username, display_name, output, db_host, db_name, superuser_un,superuser_pw, archive_to_dropbox,archive_radio,dbx_auth_token,encr_pass)
594+
gc.dwnld_insert_json_dailysummary(ath_un,gc_agent, start_date, end_date_today, gc_username, gc_password, mfp_username, display_name, output, db_host, db_name, superuser_un,superuser_pw, archive_to_dropbox,archive_radio,dbx_auth_token,encr_pass)
595595
gc_json_dailysum_progress = 'GC JSON daily summary data downloaded successfully'
596596
with StdoutRedirection(ath_un):
597597
print(gc_json_dailysum_progress)
@@ -642,7 +642,7 @@ def index():
642642
with StdoutRedirection(ath_un):
643643
print(mfp_progress)
644644
time.sleep(1)
645-
mfp.dwnld_insert_nutrition(mfp_username,mfp_password,ath_un,start_date,end_date,encr_pass,save_pwd,auto_synch,db_host,superuser_un,superuser_pw)
645+
mfp.dwnld_insert_nutrition(mfp_username,mfp_password,ath_un,start_date,end_date_today,encr_pass,save_pwd,auto_synch,db_host,superuser_un,superuser_pw)
646646
mfp_progress = 'MFP nutrition data downloaded successfully'
647647
with StdoutRedirection(ath_un):
648648
print(mfp_progress)

0 commit comments

Comments
 (0)