From 7278e38112f1abb4761b1d7382d277e5b468c574 Mon Sep 17 00:00:00 2001 From: zarazan Date: Sun, 19 Nov 2023 22:08:20 -0700 Subject: [PATCH] update docker image url --- Makefile | 4 ++-- monitor/slack.go | 11 +++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 8196711..c791225 100644 --- a/Makefile +++ b/Makefile @@ -56,10 +56,10 @@ docker-push: @docker push ghcr.io/ojo-network/price-feeder-ojo docker-build-monitor: - @DOCKER_BUILDKIT=1 docker build -t us-west4-docker.pkg.dev/ojo-network/oracle-monitor -f monitor.Dockerfile . + @DOCKER_BUILDKIT=1 docker build -t us-west4-docker.pkg.dev/ojo-network/oracle-monitor/oracle-monitor -f monitor.Dockerfile . docker-push-monitor: - @docker push us-west4-docker.pkg.dev/ojo-network/oracle-monitor + @docker push us-west4-docker.pkg.dev/ojo-network/oracle-monitor/oracle-monitor .PHONY: docker-build docker-push docker-build-monitor docker-push-monitor diff --git a/monitor/slack.go b/monitor/slack.go index 7c082bd..dbf711e 100644 --- a/monitor/slack.go +++ b/monitor/slack.go @@ -37,8 +37,7 @@ func (sc *SlackClient) Notify(priceErrors []PriceError) { for _, priceError := range priceErrors { messages = append(messages, priceError.Message) } - message := strings.Join(messages, "\n") - fmt.Println(message) + sc.SendMessages(messages) return } @@ -69,8 +68,12 @@ func (sc *SlackClient) Notify(priceErrors []PriceError) { fmt.Println("no new errors to report") return } + + sc.SendMessages(messages) +} + +func (sc *SlackClient) SendMessages(messages []string) { message := strings.Join(messages, "\n") fmt.Println(message) - - // sc.client.PostMessage(sc.config.SlackChannel, slack.MsgOptionText("test", false)) + sc.client.PostMessage(sc.config.SlackChannel, slack.MsgOptionText(message, false)) }