From be0419c3eb77a9d3b4ef3fe99dda2091be34aeb2 Mon Sep 17 00:00:00 2001 From: Alec Thomas Date: Wed, 31 May 2023 11:22:28 +1000 Subject: [PATCH] refactor: rename runner-go -> runner (#34) Instead of having per-language runners, we'll have a single service with a configuration file telling it how to launch specific language runtimes. --- cmd/{ftl-runner-go => ftl-runner}/main.go | 2 +- controlplane/controlplane.go | 2 +- {runner-go => runner}/runner.go | 4 ++-- scripts/{ftl-runner-go => ftl-runner} | 0 4 files changed, 4 insertions(+), 4 deletions(-) rename cmd/{ftl-runner-go => ftl-runner}/main.go (95%) rename {runner-go => runner}/runner.go (98%) rename scripts/{ftl-runner-go => ftl-runner} (100%) diff --git a/cmd/ftl-runner-go/main.go b/cmd/ftl-runner/main.go similarity index 95% rename from cmd/ftl-runner-go/main.go rename to cmd/ftl-runner/main.go index 03c4adca..e182e9a8 100644 --- a/cmd/ftl-runner-go/main.go +++ b/cmd/ftl-runner/main.go @@ -9,7 +9,7 @@ import ( _ "github.com/TBD54566975/ftl/common/automaxprocs" // Set GOMAXPROCS to match Linux container CPU quota. "github.com/TBD54566975/ftl/common/log" - runner "github.com/TBD54566975/ftl/runner-go" + "github.com/TBD54566975/ftl/runner" ) var version = "dev" diff --git a/controlplane/controlplane.go b/controlplane/controlplane.go index 5ad36431..bffe844d 100644 --- a/controlplane/controlplane.go +++ b/controlplane/controlplane.go @@ -315,7 +315,7 @@ func (s *Service) reapStaleRunners(ctx context.Context) { case <-ctx.Done(): return - case <-time.After(s.heartbeatTimeout): + case <-time.After(s.heartbeatTimeout / 4): } } } diff --git a/runner-go/runner.go b/runner/runner.go similarity index 98% rename from runner-go/runner.go rename to runner/runner.go index d98cf63f..10e94217 100644 --- a/runner-go/runner.go +++ b/runner/runner.go @@ -1,6 +1,6 @@ -// Package runnergo contains a server that implements the RunnerService and +// Package runner contains a server that implements the RunnerService and // proxies VerbService requests to user code. -package runnergo +package runner import ( context "context" diff --git a/scripts/ftl-runner-go b/scripts/ftl-runner similarity index 100% rename from scripts/ftl-runner-go rename to scripts/ftl-runner