From e1a1bd00425afbcb3b5496865f85f8978a2423c3 Mon Sep 17 00:00:00 2001 From: pegahtah Date: Wed, 23 Feb 2022 10:08:02 -0500 Subject: [PATCH] changed the timing of query to 18 months (540 days) commented out the deployment of the other CF --- build-and-deploy-cloud-functions.sh | 20 +++++++++---------- .../cf/TestBostonKitTrackerDispatcher.java | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/build-and-deploy-cloud-functions.sh b/build-and-deploy-cloud-functions.sh index cb2f3aefa..10e9949ff 100755 --- a/build-and-deploy-cloud-functions.sh +++ b/build-and-deploy-cloud-functions.sh @@ -19,16 +19,16 @@ gcloud --project=${PROJECT_ID} functions deploy \ --vpc-connector=projects/${PROJECT_ID}/locations/us-central1/connectors/appengine-default-connect -echo "Deploying kit boston tracking to ${PROJECT_ID}" -gcloud --project=${PROJECT_ID} functions deploy \ - tbos-kit-ups-tracker \ - --entry-point=org.broadinstitute.dsm.jobs.TestBostonUPSTrackingJob \ - --runtime=java11 \ - --trigger-topic=cf-kit-tracking \ - --timeout=540\ - --source=target/deployment \ - --set-env-vars="PROJECT_ID=${PROJECT_ID},SECRET_ID=cf-kit-tracker,STUDY_MANAGER_SCHEMA=${STUDY_MANAGER_SCHEMA},STUDY_SERVER_SCHEMA=${STUDY_SERVER_SCHEMA}" \ - --vpc-connector=projects/${PROJECT_ID}/locations/us-central1/connectors/appengine-default-connect +#echo "Deploying kit boston tracking to ${PROJECT_ID}" +#gcloud --project=${PROJECT_ID} functions deploy \ +# tbos-kit-ups-tracker \ +# --entry-point=org.broadinstitute.dsm.jobs.TestBostonUPSTrackingJob \ +# --runtime=java11 \ +# --trigger-topic=cf-kit-tracking \ +# --timeout=540\ +# --source=target/deployment \ +# --set-env-vars="PROJECT_ID=${PROJECT_ID},SECRET_ID=cf-kit-tracker,STUDY_MANAGER_SCHEMA=${STUDY_MANAGER_SCHEMA},STUDY_SERVER_SCHEMA=${STUDY_SERVER_SCHEMA}" \ +# --vpc-connector=projects/${PROJECT_ID}/locations/us-central1/connectors/appengine-default-connect diff --git a/src/main/java/org/broadinstitute/dsm/cf/TestBostonKitTrackerDispatcher.java b/src/main/java/org/broadinstitute/dsm/cf/TestBostonKitTrackerDispatcher.java index 461250ed8..e3cf9f3cc 100644 --- a/src/main/java/org/broadinstitute/dsm/cf/TestBostonKitTrackerDispatcher.java +++ b/src/main/java/org/broadinstitute/dsm/cf/TestBostonKitTrackerDispatcher.java @@ -74,7 +74,7 @@ public void accept(PubsubMessage pubsubMessage, Context context) throws Exceptio " ))"; String SQL_AVOID_DELIVERED = " and (tracking_to_id is not null or tracking_return_id is not null ) and kit.test_result is null " + " and ( ups_status_description is null or ups_status_description not like \"%Delivered%\") "+ - " and from_unixtime(created_date/1000) > NOW() - INTERVAL 360 DAY"+ + " and from_unixtime(created_date/1000) > NOW() - INTERVAL 540 DAY"+ " and (kit.ups_tracking_status is null or kit.ups_tracking_status not like \"%Delivered%\" or kit.ups_return_status is null or kit.ups_return_status not like \"%Delivered%\") " + " order by kit.dsm_kit_request_id ASC LIMIT ?"; logger.info("Starting the UPS lookup job");