Add worker health endpoints
This commit is contained in:
@@ -26,6 +26,8 @@ type Config struct {
|
||||
AIStatsTimeout time.Duration
|
||||
|
||||
WorkerID string
|
||||
WorkerHTTPHost string
|
||||
WorkerHTTPPort int
|
||||
WorkerPollInterval time.Duration
|
||||
WorkerClaimLimit int
|
||||
WorkerLeaseTimeout time.Duration
|
||||
@@ -53,6 +55,8 @@ func Load() Config {
|
||||
AIStatsTimeout: envDuration("AI_STATS_TIMEOUT", 8*time.Second),
|
||||
|
||||
WorkerID: envString("WORKER_ID", hostname()),
|
||||
WorkerHTTPHost: envString("WORKER_HTTP_HOST", "0.0.0.0"),
|
||||
WorkerHTTPPort: envInt("WORKER_HTTP_PORT", 8081),
|
||||
WorkerPollInterval: envDuration("WORKER_POLL_INTERVAL", 2*time.Second),
|
||||
WorkerClaimLimit: envInt("WORKER_CLAIM_LIMIT", 4),
|
||||
WorkerLeaseTimeout: envDuration("WORKER_LEASE_TIMEOUT", 15*time.Minute),
|
||||
|
||||
Reference in New Issue
Block a user