bricolage 5.26.0 → 5.27.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bricolage/jobnetrunner.rb +22 -0
- data/lib/bricolage/version.rb +1 -1
- data/test/home/Gemfile.lock +1 -19
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e3dbe169737e338845aaed2828c95b55fbddd74
|
4
|
+
data.tar.gz: 78cff717b492a0f5074b43f472507b5491fe7d4b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1205c5dac00149fffd45895c85441408a03413ee127a992d533d1e53dde81864143e1e9fd159ac78a61ea4c13f2215eed1561f66de738139cbd0b5ce8ec0af2
|
7
|
+
data.tar.gz: 6aa81f8e1332132ffc8ee171ee8964340b7a3583c77aa8bb8143c1a567673fb38c3885da299a60c08a9d34845bbfce3838c3579ab03f510f7e39a627483307cf
|
@@ -12,6 +12,7 @@ require 'bricolage/loglocatorbuilder'
|
|
12
12
|
require 'bricolage/logger'
|
13
13
|
require 'bricolage/exception'
|
14
14
|
require 'bricolage/version'
|
15
|
+
require 'fileutils'
|
15
16
|
require 'pathname'
|
16
17
|
require 'optparse'
|
17
18
|
|
@@ -53,6 +54,10 @@ module Bricolage
|
|
53
54
|
exit EXIT_SUCCESS
|
54
55
|
end
|
55
56
|
|
57
|
+
if opts.clear_queue?
|
58
|
+
clear_queue(opts)
|
59
|
+
exit EXIT_SUCCESS
|
60
|
+
end
|
56
61
|
queue = get_queue(opts)
|
57
62
|
if queue.locked?
|
58
63
|
raise ParameterError, "Job queue is still locked. If you are sure to restart jobnet, #{queue.unlock_help}"
|
@@ -86,6 +91,12 @@ module Bricolage
|
|
86
91
|
@ctx.logger
|
87
92
|
end
|
88
93
|
|
94
|
+
def clear_queue(opts)
|
95
|
+
if path = get_queue_file_path(opts)
|
96
|
+
FileUtils.rm_f path
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
89
100
|
def get_queue(opts)
|
90
101
|
if path = get_queue_file_path(opts)
|
91
102
|
logger.info "queue path: #{path}"
|
@@ -206,6 +217,7 @@ module Bricolage
|
|
206
217
|
@dump_options = false
|
207
218
|
@check_only = false
|
208
219
|
@list_jobs = false
|
220
|
+
@clear_queue = false
|
209
221
|
|
210
222
|
init_options
|
211
223
|
end
|
@@ -253,6 +265,12 @@ Options:
|
|
253
265
|
parser.on('-Q', '--enable-queue', 'Enables job queue.') {
|
254
266
|
@opts_cmdline['enable-queue'] = OptionValue.new('--enable-queue option', true)
|
255
267
|
}
|
268
|
+
parser.on('--disable-queue', 'Disables job queue.') {
|
269
|
+
@opts_cmdline['enable-queue'] = OptionValue.new('--disable-queue option', false)
|
270
|
+
}
|
271
|
+
parser.on('--clear-queue', 'Clears job queue and quit.') {
|
272
|
+
@clear_queue = true
|
273
|
+
}
|
256
274
|
parser.on('--queue-path=PATH', 'Enables job queue with this path.') {|path|
|
257
275
|
@opts_cmdline['queue-path'] = OptionValue.new('--queue-path option', path)
|
258
276
|
}
|
@@ -331,6 +349,10 @@ Options:
|
|
331
349
|
end
|
332
350
|
end
|
333
351
|
|
352
|
+
def clear_queue?
|
353
|
+
@clear_queue
|
354
|
+
end
|
355
|
+
|
334
356
|
def option_pairs
|
335
357
|
common_options.merge({
|
336
358
|
'environment' => OptionValue.new(nil, @environment)
|
data/lib/bricolage/version.rb
CHANGED
data/test/home/Gemfile.lock
CHANGED
@@ -1,21 +1,7 @@
|
|
1
|
-
PATH
|
2
|
-
remote: ../../../bricolage-mysql
|
3
|
-
specs:
|
4
|
-
bricolage-mysql (5.26.0)
|
5
|
-
bricolage (>= 5.26.0)
|
6
|
-
mysql2
|
7
|
-
|
8
|
-
PATH
|
9
|
-
remote: ../../../bricolage-redis
|
10
|
-
specs:
|
11
|
-
bricolage-redis (5.26.0)
|
12
|
-
bricolage (>= 5.26.0)
|
13
|
-
redis (~> 3)
|
14
|
-
|
15
1
|
PATH
|
16
2
|
remote: ../..
|
17
3
|
specs:
|
18
|
-
bricolage (5.
|
4
|
+
bricolage (5.27.0)
|
19
5
|
aws-sdk-s3 (~> 1)
|
20
6
|
aws-sdk-sns (~> 1)
|
21
7
|
pg (~> 0.18.0)
|
@@ -42,20 +28,16 @@ GEM
|
|
42
28
|
coderay (1.1.2)
|
43
29
|
jmespath (1.3.1)
|
44
30
|
method_source (0.9.0)
|
45
|
-
mysql2 (0.4.10)
|
46
31
|
pg (0.18.4)
|
47
32
|
pry (0.11.3)
|
48
33
|
coderay (~> 1.1.0)
|
49
34
|
method_source (~> 0.9.0)
|
50
|
-
redis (3.3.3)
|
51
35
|
|
52
36
|
PLATFORMS
|
53
37
|
ruby
|
54
38
|
|
55
39
|
DEPENDENCIES
|
56
40
|
bricolage!
|
57
|
-
bricolage-mysql!
|
58
|
-
bricolage-redis!
|
59
41
|
pry
|
60
42
|
|
61
43
|
BUNDLED WITH
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bricolage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.27.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Minero Aoki
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|
@@ -111,8 +111,8 @@ dependencies:
|
|
111
111
|
description: Redshift-oriented Data Warehouse Batch Framework
|
112
112
|
email: aamine@loveruby.net
|
113
113
|
executables:
|
114
|
-
- bricolage
|
115
114
|
- bricolage-jobnet
|
115
|
+
- bricolage
|
116
116
|
extensions: []
|
117
117
|
extra_rdoc_files: []
|
118
118
|
files:
|