-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add raw check logs to show check result audit
- Loading branch information
Showing
4 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# frozen_string_literal: true | ||
|
||
class CheckLog | ||
include Mongoid::Document | ||
|
||
field :response, type: Hash | ||
|
||
field :region, type: String | ||
field :agent, type: String | ||
|
||
belongs_to :check | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# frozen_string_literal: true | ||
|
||
class DestroyCheckWorker | ||
include Sidekiq::Worker | ||
|
||
# @param sting check id | ||
def perform(check_id) | ||
@check = Check.find(check_id) | ||
|
||
delete_incident! | ||
delete_assertion! | ||
delete_check_response! | ||
delete_daily_uptime! | ||
delete_notification! | ||
end | ||
|
||
private | ||
|
||
def delete_incident! | ||
|
||
end | ||
|
||
def delete_assertion! | ||
|
||
end | ||
|
||
def delete_check_response! | ||
|
||
end | ||
|
||
def delete_daily_uptime! | ||
|
||
end | ||
|
||
def delete_notification! | ||
|
||
end | ||
end |