Commit 7bd8d2e2 authored by Toon Claes's avatar Toon Claes

Pass the result as a positive bool

parent 22a0ef3d
...@@ -5,15 +5,16 @@ module RepositoryCheck ...@@ -5,15 +5,16 @@ module RepositoryCheck
def perform(project_id) def perform(project_id)
project = Project.find(project_id) project = Project.find(project_id)
result = check(project)
save_result(project, !check) save_result(project, result)
end end
private private
def save_result(project, failure) def save_result(project, result)
project.update_columns( project.update_columns(
last_repository_check_failed: failure, last_repository_check_failed: !result,
last_repository_check_at: Time.now last_repository_check_at: Time.now
) )
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment