From 8932f46900807f9dae39dbd42e7dfd6082d68d77 Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Fri, 13 Feb 2026 21:46:20 +0000 Subject: [PATCH] Fix bug where I stopped initiating the background processes --- background/arcgis.go | 8 +++++++- main.go | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/background/arcgis.go b/background/arcgis.go index b2f26159..7fd1c40b 100644 --- a/background/arcgis.go +++ b/background/arcgis.go @@ -154,6 +154,9 @@ func refreshFieldseekerData(background_ctx context.Context, newOauthCh <-chan st log.Error().Err(err).Msg("Failed to get oauths") return } + if len(oauths) == 0 { + log.Info().Msg("No oauths to maintain") + } for _, oauth := range oauths { wg.Add(1) go func() { @@ -176,6 +179,9 @@ func refreshFieldseekerData(background_ctx context.Context, newOauthCh <-chan st log.Error().Err(err).Msg("Failed to get orgs") return } + if len(orgs) == 0 { + log.Info().Msg("No orgs to maintain") + } for _, org := range orgs { wg.Add(1) go func() { @@ -183,7 +189,7 @@ func refreshFieldseekerData(background_ctx context.Context, newOauthCh <-chan st err := periodicallyExportFieldseeker(workerCtx, org) if err != nil { if errors.Is(err, &NoOAuthForOrg{}) { - //log.Debug().Int("organization_id", int(org.ID)).Msg("No oauth available for organization, exiting exporter.") + log.Debug().Int("organization_id", int(org.ID)).Msg("No oauth available for organization, exiting exporter.") return } log.Error().Err(err).Msg("Crashed fieldseeker export goroutine") diff --git a/main.go b/main.go index 63e68d98..bdf7f294 100644 --- a/main.go +++ b/main.go @@ -135,6 +135,7 @@ func main() { // Start up background processes ctx, cancel := context.WithCancel(context.Background()) defer cancel() + background.Start(ctx) openai_logger := log.With().Logger() err = llm.CreateOpenAIClient(ctx, &openai_logger)