circleci
0 of 2 new or added lines in 2 files covered. (0.0%)
711 existing lines in 37 files now uncovered.2600 of 3108 relevant lines covered (83.66%)
315.14 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| |
× |
|
UNCOV
7
|
next if req.output_file.nil? |
× |
|
UNCOV
8
|
File.delete(req.output_file) if File.exist?(req.output_file) |
× |
|
UNCOV
9
|
req.state = UserRequest::STALE |
× |
|
UNCOV
10
|
req.save |
× |
|
UNCOV
11
|
end
|
|
|
UNCOV
12
|
end
|
|
|
UNCOV
13
|
end
|