web47core 1.0.10 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/app/jobs/cron/trim_collection.rb +8 -1
- data/lib/web47core/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 47a4d6b158639c596b5ed01bc73a7f163d19e8ccd9bb7d51089b640368ce9e5b
|
|
4
|
+
data.tar.gz: 9203632b762294331dc976f61cc99eab95979d1ec58a95405286ba98ae6c58a1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 41b150960174a0f848103fcbec5be7847b4115abce5ba1ee00351bb028fe1bd16bd9f84b5a58b463b0b7eb71002c6e5917028208ca09cfeedf4631adcea09ae3
|
|
7
|
+
data.tar.gz: e67b0d44151b9e0a8aea5e55e7427ca0b527ea9f9c05e70abb65ef011ada7db91e58b11ae3fa4ba9bc88ba5bd9632d7cc5a667bb0d7771d7a5b785b5742e72bb
|
|
@@ -31,12 +31,19 @@ module Cron
|
|
|
31
31
|
# Test if this should be archived
|
|
32
32
|
#
|
|
33
33
|
def archive?(item)
|
|
34
|
-
item.
|
|
34
|
+
item.send(comparison_field) < allowed_time_for_item(item)
|
|
35
35
|
rescue StandardError => error
|
|
36
36
|
App47Logger.log_warn "Unable to archive item #{item.inspect}", error
|
|
37
37
|
false
|
|
38
38
|
end
|
|
39
39
|
|
|
40
|
+
#
|
|
41
|
+
# Return which field to use for comparison when trimming objects
|
|
42
|
+
#
|
|
43
|
+
def comparison_field
|
|
44
|
+
:updated_at
|
|
45
|
+
end
|
|
46
|
+
|
|
40
47
|
#
|
|
41
48
|
# Try to get a TTL from System configuration, otherwise return the default
|
|
42
49
|
#
|
data/lib/web47core/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: web47core
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.11
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chris Schroeder
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-09-
|
|
11
|
+
date: 2020-09-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|