Skip to content

Commit

Permalink
still making progress
Browse files Browse the repository at this point in the history
  • Loading branch information
smonero committed Mar 6, 2024
1 parent 0e831f3 commit 5f84555
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion server/neptune/admin/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (

"github.com/palantir/go-githubapp/githubapp"
"github.com/runatlantis/atlantis/server/neptune/lyft/feature"
"github.com/runatlantis/atlantis/server/neptune/sync/crons"
ghClient "github.com/runatlantis/atlantis/server/neptune/workflows/activities/github"
"github.com/runatlantis/atlantis/server/vcs/provider/github"

Expand All @@ -25,6 +26,7 @@ import (
"github.com/runatlantis/atlantis/server/metrics"
adminconfig "github.com/runatlantis/atlantis/server/neptune/admin/config"
neptune_http "github.com/runatlantis/atlantis/server/neptune/http"
internalSync "github.com/runatlantis/atlantis/server/neptune/sync"
"github.com/runatlantis/atlantis/server/neptune/temporal"
neptune "github.com/runatlantis/atlantis/server/neptune/temporalworker/config"
"github.com/runatlantis/atlantis/server/neptune/workflows"
Expand All @@ -38,6 +40,8 @@ import (

type Server struct {
Logger logging.Logger
CronScheduler *internalSync.CronScheduler
Crons []*internalSync.Cron
HTTPServerProxy *neptune_http.ServerProxy
Port int
StatsScope tally.Scope
Expand Down Expand Up @@ -145,8 +149,17 @@ func NewServer(config *adminconfig.Config) (*Server, error) {
return nil, errors.Wrap(err, "initializing github activities")
}

cronScheduler := internalSync.NewCronScheduler(config.CtxLogger)

server := Server{
Logger: config.CtxLogger,
Logger: config.CtxLogger,
CronScheduler: cronScheduler,
Crons: []*internalSync.Cron{
{
Executor: crons.NewRuntimeStats(scope).Run,
Frequency: 1 * time.Minute,
},
},
HTTPServerProxy: httpServerProxy,
Port: config.ServerCfg.Port,
StatsScope: scope,
Expand Down

0 comments on commit 5f84555

Please sign in to comment.