rbbt-util 5.23.20 → 5.23.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rbbt/util/misc.rb +3 -1
- data/share/rbbt_commands/system/clean +3 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '08b49f3913846e398ef9edb5607ffed78089e2ff'
|
4
|
+
data.tar.gz: 775643f2bad7a86d757adbc41c7393a5cbb5f8af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98ec1677f453ffcaae30565bf6fdc497e1b96bb53dc6972e2ce50a6989aa25b817bc960cb9d4d52e937464c8a11989dc3cd1b53324773d7fa376a0c5f1a7cfb2
|
7
|
+
data.tar.gz: d3b5a410013005ef9ade2b2aa234f895b5c6490090fbbc97b2082e4a8b25e5a4a11031487db3fd6d43d81dde384abb3b5fe565dd55f83dca908b94335067821d
|
data/lib/rbbt/util/misc.rb
CHANGED
@@ -71,10 +71,12 @@ module Misc
|
|
71
71
|
def self.timespan(str, default = "s")
|
72
72
|
tokens = {
|
73
73
|
"s" => (1),
|
74
|
-
"
|
74
|
+
"min" => (60),
|
75
75
|
"h" => (60 * 60),
|
76
76
|
"d" => (60 * 60 * 24),
|
77
77
|
"w" => (60 * 60 * 24 * 7),
|
78
|
+
"m" => (60 * 60 * 24 * 30),
|
79
|
+
"y" => (60 * 60 * 24 * 365),
|
78
80
|
}
|
79
81
|
|
80
82
|
tokens[nil] = tokens[default]
|
@@ -109,7 +109,9 @@ TSV.traverse jobs, :_bar => "Checking job status" do |file,i|
|
|
109
109
|
|
110
110
|
if time and File.exists?(file)
|
111
111
|
old = Time.now - File.atime(file)
|
112
|
-
|
112
|
+
if old > time
|
113
|
+
status = 'old'
|
114
|
+
end
|
113
115
|
end
|
114
116
|
|
115
117
|
if (force and status !~ /done/) or
|