Class: Appsignal::CheckIn::Cron

Inherits:
Object
  • Object
show all
Defined in:
lib/appsignal/check_in/cron.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(identifier:) ⇒ Cron

Returns a new instance of Cron.



9
10
11
12
# File 'lib/appsignal/check_in/cron.rb', line 9

def initialize(identifier:)
  @identifier = identifier
  @digest = SecureRandom.hex(8)
end

Instance Attribute Details

#digestObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



7
8
9
# File 'lib/appsignal/check_in/cron.rb', line 7

def digest
  @digest
end

#identifierObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



7
8
9
# File 'lib/appsignal/check_in/cron.rb', line 7

def identifier
  @identifier
end

Instance Method Details

#finishObject



18
19
20
# File 'lib/appsignal/check_in/cron.rb', line 18

def finish
  CheckIn.scheduler.schedule(event("finish"))
end

#startObject



14
15
16
# File 'lib/appsignal/check_in/cron.rb', line 14

def start
  CheckIn.scheduler.schedule(event("start"))
end