rbbt-util 5.26.33 → 5.26.34
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/bin/rbbt +8 -2
- data/lib/rbbt/persist.rb +11 -13
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0c859c48e53a0a17ca7f6d45b8715dae195771a781e956a5884d252b601c7987
|
|
4
|
+
data.tar.gz: b94425bb7d9205fe6b1bd034d113a8a1419c10f8cc57280ab885d223040f3f86
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 443e13d560951c8d3bec118ff344b41d5aff2cb11a845d3e709f0397aed6ff59cef0798e405523d30c06c002c8c25c07ee6d8e009d52cf1f32add9661aae9c55
|
|
7
|
+
data.tar.gz: 1471b2f9363c7ca25783ae22e2b4076c9e29200fad3be0b4634ea7471be97e8f8c6c40f340eabcc0bb32e5e5811d562d45b9f62869b068db5fa721a7995b1d18
|
data/bin/rbbt
CHANGED
|
@@ -51,7 +51,8 @@ $ rbbt <command> <subcommand> ... -a --arg1 --arg2='value' --arg3 'another-value
|
|
|
51
51
|
--nocolor #{Log.color :yellow, "Disable colored output"}
|
|
52
52
|
--nobar #{Log.color :yellow, "Disable progress report"}
|
|
53
53
|
--nostream #{Log.color :yellow, "Disable persistance/job streaming"}
|
|
54
|
-
--
|
|
54
|
+
--update #{Log.color :yellow, "Update persisted files when dependencies update"}
|
|
55
|
+
--update_tsv #{Log.color :yellow, "Update persisted TSV files also if source has been updated"}
|
|
55
56
|
--locate_file #{Log.color :yellow, "Report the location of the script instead of executing it"}
|
|
56
57
|
--dump_mem* #{Log.color :yellow, "Dump strings in memory each second into file"}
|
|
57
58
|
-nolock--no_lock_id #{Log.color :yellow, "Do not track lockfiles with ids (prevent stale file handlers for high-througput and high-concurrency)"}
|
|
@@ -116,7 +117,12 @@ if options[:config_keys]
|
|
|
116
117
|
end
|
|
117
118
|
end
|
|
118
119
|
|
|
119
|
-
if options.delete(:
|
|
120
|
+
if options.delete(:update)
|
|
121
|
+
ENV["RBBT_UPDATE"] = "true"
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if options.delete(:update_tsv)
|
|
125
|
+
ENV["RBBT_UPDATE"] = "true"
|
|
120
126
|
ENV["RBBT_UPDATE_TSV_PERSIST"] = "true"
|
|
121
127
|
end
|
|
122
128
|
|
data/lib/rbbt/persist.rb
CHANGED
|
@@ -40,21 +40,19 @@ module Persist
|
|
|
40
40
|
def self.is_persisted?(path, persist_options = {})
|
|
41
41
|
return false if not Open.exists? path
|
|
42
42
|
return false if TrueClass === persist_options[:update]
|
|
43
|
+
return true unless ENV["RBBT_UPDATE"]
|
|
43
44
|
|
|
44
|
-
check = persist_options[:check]
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
end
|
|
45
|
+
case check = persist_options[:check]
|
|
46
|
+
when nil
|
|
47
|
+
true
|
|
48
|
+
when Array
|
|
49
|
+
newer = check.select{|file| newer? path, file}
|
|
50
|
+
return true if newer.empty?
|
|
51
|
+
Log.medium "Persistence check for #{path} failed in: #{ Misc.fingerprint(newer)}"
|
|
52
|
+
return false
|
|
53
|
+
else
|
|
54
|
+
! newer?(path, check)
|
|
55
55
|
end
|
|
56
|
-
|
|
57
|
-
return true
|
|
58
56
|
end
|
|
59
57
|
|
|
60
58
|
def self.persistence_path(file, persist_options = {}, options = {})
|