Skip to content

Commit

Permalink
Handle nil
Browse files Browse the repository at this point in the history
  • Loading branch information
nygrenh committed Oct 8, 2024
1 parent 9fde8bb commit fa652ad
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions script/passenger_worker_cleaner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def initialize(pid:, sessions:, processed:, uptime_str:, cpu:, memory_str:, last

# Parses a time string like "16m 52s" into total seconds
def parse_time(time_str)
return 0 unless time_str
total_seconds = 0
# Match patterns like "16m", "52s", etc.
time_str.scan(/(\d+)m|(\d+)s/) do |min, sec|
Expand Down

0 comments on commit fa652ad

Please sign in to comment.