Skip to content

Commit

Permalink
Increase process name length constraint from 30 to 63
Browse files Browse the repository at this point in the history
  • Loading branch information
mrrooijen committed Nov 15, 2024
1 parent 781d173 commit bd53a1e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/hirefire/worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions test/hirefire/test_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def test_setup_and_methods
"Worker_123",
"worker-123",
"w",
"a" * 30
"a" * 63
]

valid_names.each do |name|
Expand All @@ -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|
Expand Down

0 comments on commit bd53a1e

Please sign in to comment.