Class: Judoscale::Config::RuntimeContainer

Inherits:
String
  • Object
show all
Defined in:
lib/judoscale/config.rb

Constant Summary collapse

ORDINAL_CONTAINER =

Job metrics are collected from a single container per process type when we can identify the ordinal instance (Heroku “web.2”, Scalingo “web-2”). Opaque IDs (Render, ECS, Railway, etc.) are always non-redundant.

/\A[a-z_]+[.-](\d{1,3})\z/

Instance Method Summary collapse

Instance Method Details

#redundant_instance?Boolean

Returns:

  • (Boolean)


14
15
16
17
# File 'lib/judoscale/config.rb', line 14

def redundant_instance?
  match = match(ORDINAL_CONTAINER)
  match ? match[1].to_i > 1 : false
end