This commit is contained in:
2022-09-17 09:24:09 -07:00
parent 7e23b1e89a
commit 8b271e9e2a
4 changed files with 8 additions and 8 deletions

View File

@@ -5,14 +5,14 @@
[mount.core :as mount] [mount.core :as mount]
[auto-ap.datomic :refer [conn]] [auto-ap.datomic :refer [conn]]
[clojure.tools.logging :as log] [clojure.tools.logging :as log]
[auto-ap.background.metrics :refer [metrics-setup container-tags logging-context]] [auto-ap.background.metrics :refer [metrics-setup container-tags container-data logging-context]]
[unilog.context :as lc])) [unilog.context :as lc]))
(defn -main [& _] (defn -main [& _]
(lc/with-context {:background-job "square-loading-new"} (lc/with-context {:background-job "square-loading-new"}
(mount/start (mount/only #{#'conn #'metrics-setup #'container-tags #'logging-context})) (mount/start (mount/only #{#'conn #'metrics-setup #'container-tags #'logging-context #'container-data}))
((heartbeat square/upsert-all "square-loading")) ((heartbeat square/upsert-all "square-loading"))
(mount/stop ) (mount/stop )
(log/info "Stopping Square loading") (log/info "Stopping Square loading")
(System/exit 0))) (System/exit 0)))

View File

@@ -326,7 +326,7 @@ resource "aws_service_discovery_service" "background_worker_service" {
resource "aws_cloudwatch_event_rule" "square_import_job_schedule" { resource "aws_cloudwatch_event_rule" "square_import_job_schedule" {
name = "square-import-job-schedule" name = "square-import-job-schedule"
schedule_expression = "rate(4 hours)" schedule_expression = "cron(45 * * * ? *)"
} }

View File

@@ -1,7 +1,7 @@
{ {
"version": 4, "version": 4,
"terraform_version": "1.2.7", "terraform_version": "1.2.7",
"serial": 141, "serial": 145,
"lineage": "9b630886-8cee-a57d-c7a2-4f19f13f9c51", "lineage": "9b630886-8cee-a57d-c7a2-4f19f13f9c51",
"outputs": { "outputs": {
"aws_access_key_id": { "aws_access_key_id": {
@@ -101,7 +101,7 @@
"name": "square-import-job-schedule", "name": "square-import-job-schedule",
"name_prefix": "", "name_prefix": "",
"role_arn": "", "role_arn": "",
"schedule_expression": "rate(4 hours)", "schedule_expression": "cron(45 * * * ? *)",
"tags": {}, "tags": {},
"tags_all": {} "tags_all": {}
}, },

View File

@@ -1,7 +1,7 @@
{ {
"version": 4, "version": 4,
"terraform_version": "1.2.7", "terraform_version": "1.2.7",
"serial": 139, "serial": 143,
"lineage": "9b630886-8cee-a57d-c7a2-4f19f13f9c51", "lineage": "9b630886-8cee-a57d-c7a2-4f19f13f9c51",
"outputs": { "outputs": {
"aws_access_key_id": { "aws_access_key_id": {
@@ -101,7 +101,7 @@
"name": "square-import-job-schedule", "name": "square-import-job-schedule",
"name_prefix": "", "name_prefix": "",
"role_arn": "", "role_arn": "",
"schedule_expression": "cron(06 * * * ? *)", "schedule_expression": "cron(30 * * * ? *)",
"tags": {}, "tags": {},
"tags_all": {} "tags_all": {}
}, },