Module: Debci::Test::Expired

Included in:
Job
Defined in:
lib/debci/test/expired.rb

Instance Method Summary collapse

Instance Method Details

#expired?Boolean

Returns:

  • (Boolean)


4
5
6
7
8
9
10
11
12
13
# File 'lib/debci/test/expired.rb', line 4

def expired?
  return false unless self.date
  days = Debci.config.data_retention_days.to_i
  if days > 0
    retention_window = days * (24 * 60 * 60)
    Time.now > self.date + retention_window.seconds
  else
    false
  end
end