capistrano_multiconfig_parallel 0.18.0 → 0.18.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/capistrano_multiconfig_parallel/celluloid/celluloid_manager.rb +1 -10
- data/lib/capistrano_multiconfig_parallel/celluloid/celluloid_worker.rb +1 -1
- data/lib/capistrano_multiconfig_parallel/celluloid/rake_worker.rb +1 -1
- data/lib/capistrano_multiconfig_parallel/helpers/core_helper.rb +12 -0
- data/lib/capistrano_multiconfig_parallel/version.rb +1 -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: 90467fb1e95571ff800390c44e68f08d7d4b9b2f
|
4
|
+
data.tar.gz: a9fa1498b21325d91a363c0b15c92e9b33ad3aac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 735c86753f6a6af76c9c339e5b5c14e8b655eb92216daafeba8034930e87d7ece4b9bcbb38f7ddc168ab6dc44d6ee0cb014fdda9551759edc9fbdde26f506d86
|
7
|
+
data.tar.gz: 7bfd74cfa40521cb0a8bf8508624e54d9fa2f0a005f9a36470492e7f2f49f9e25f1e9f91215dc3d52008b79c480e9892576641999a14a2c921c39e76a03401c6
|
@@ -37,16 +37,7 @@ module CapistranoMulticonfigParallel
|
|
37
37
|
@worker_supervisor.supervise_as(:web_server, CapistranoMulticonfigParallel::WebServer, websocket_config)
|
38
38
|
end
|
39
39
|
|
40
|
-
|
41
|
-
websocket_config['enable_debug'].to_s == 'true'
|
42
|
-
end
|
43
|
-
|
44
|
-
def websocket_config
|
45
|
-
config = app_configuration[:websocket_server]
|
46
|
-
config.present? && config.is_a?(Hash) ? config.stringify_keys : {}
|
47
|
-
config['enable_debug'] = config.fetch('enable_debug', '').to_s == 'true'
|
48
|
-
config
|
49
|
-
end
|
40
|
+
|
50
41
|
|
51
42
|
def generate_job_id(job)
|
52
43
|
@jobs[job['id']] = job
|
@@ -44,7 +44,7 @@ module CapistranoMulticonfigParallel
|
|
44
44
|
def start_task
|
45
45
|
@manager.setup_worker_conditions(Actor.current)
|
46
46
|
log_to_file("exec worker #{@job_id} starts task with #{@job.inspect}")
|
47
|
-
@client = CelluloidPubsub::Client.connect(actor: Actor.current, enable_debug:
|
47
|
+
@client = CelluloidPubsub::Client.connect(actor: Actor.current, enable_debug: debug_websocket?, channel: subscription_channel)
|
48
48
|
end
|
49
49
|
|
50
50
|
def publish_rake_event(data)
|
@@ -52,7 +52,7 @@ module CapistranoMulticonfigParallel
|
|
52
52
|
|
53
53
|
def initialize_subscription
|
54
54
|
return if defined?(@client) && @client.present?
|
55
|
-
@client = CelluloidPubsub::Client.connect(actor: Actor.current, enable_debug:
|
55
|
+
@client = CelluloidPubsub::Client.connect(actor: Actor.current, enable_debug: debug_websocket?, channel: @subscription_channel)
|
56
56
|
end
|
57
57
|
|
58
58
|
def task_name
|
@@ -101,5 +101,17 @@ module CapistranoMulticonfigParallel
|
|
101
101
|
end
|
102
102
|
worker_log
|
103
103
|
end
|
104
|
+
|
105
|
+
def debug_websocket?
|
106
|
+
websocket_config['enable_debug'].to_s == 'true'
|
107
|
+
end
|
108
|
+
|
109
|
+
def websocket_config
|
110
|
+
config = app_configuration[:websocket_server]
|
111
|
+
config.present? && config.is_a?(Hash) ? config.stringify_keys : {}
|
112
|
+
config['enable_debug'] = config.fetch('enable_debug', '').to_s == 'true'
|
113
|
+
config
|
114
|
+
end
|
115
|
+
|
104
116
|
end
|
105
117
|
end
|