push
circleci
5 of 7 new or added lines in 1 file covered. (71.43%)
557 existing lines in 36 files now uncovered.2760 of 3154 relevant lines covered (87.51%)
362.41 hits per line
| 1 |
# frozen_string_literal: true
|
|
|
UNCOV
2
|
class FileInventoryCleanupJob < ApplicationJob |
1✔ |
|
UNCOV
3
|
queue_as :default
|
1✔ |
| 4 |
|
|
|
UNCOV
5
|
def perform |
1✔ |
|
UNCOV
6
|
FileInventoryRequest.where(["completion_time < ?", 7.days.ago]).each do |req| |
3✔ |
|
UNCOV
7
|
next if req.output_file.nil? |
3✔ |
|
UNCOV
8
|
File.delete(req.output_file) if File.exist?(req.output_file) |
2✔ |
|
UNCOV
9
|
req.state = UserRequest::STALE |
2✔ |
|
UNCOV
10
|
req.save |
2✔ |
|
UNCOV
11
|
end
|
|
|
UNCOV
12
|
end
|
|
|
UNCOV
13
|
end
|