From bd53a1e4624c059d285478a274c535fa8c62b254 Mon Sep 17 00:00:00 2001 From: Michael van Rooijen Date: Fri, 15 Nov 2024 10:39:05 +0100 Subject: [PATCH] Increase process name length constraint from 30 to 63 --- lib/hirefire/worker.rb | 2 +- test/hirefire/test_worker.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/hirefire/worker.rb b/lib/hirefire/worker.rb index d909642..37b037c 100644 --- a/lib/hirefire/worker.rb +++ b/lib/hirefire/worker.rb @@ -6,7 +6,7 @@ class InvalidDynoNameError < StandardError; end class MissingDynoBlockError < StandardError; end - PROCESS_NAME_PATTERN = /\A[a-zA-Z][a-zA-Z0-9_-]{0,29}\z/ + PROCESS_NAME_PATTERN = /\A[a-zA-Z][a-zA-Z0-9_-]{0,62}\z/ attr_reader :name diff --git a/test/hirefire/test_worker.rb b/test/hirefire/test_worker.rb index d1a323e..fb0f9ee 100644 --- a/test/hirefire/test_worker.rb +++ b/test/hirefire/test_worker.rb @@ -12,7 +12,7 @@ def test_setup_and_methods "Worker_123", "worker-123", "w", - "a" * 30 + "a" * 63 ] valid_names.each do |name| @@ -31,7 +31,7 @@ def test_invalid_dyno_name_error "worker!", # Contains an invalid character " worker", # Starts with a space "worker ", # Ends with a space - "a" * 31 # Exceeds maximum length + "a" * 64 # Exceeds maximum length ] invalid_names.each do |name|