workflow_manager 0.5.1 → 0.5.2
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/workflow_manager/server.rb +7 -3
- data/lib/workflow_manager/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: '08c87b93bcb1fc9aadd48bea307f1543787acf79'
|
4
|
+
data.tar.gz: 89fd672a4e1ec7929c6e7dbf19597bed82afc110
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87f5d37dd1394ef6bbb894e163a629c12eb590a270edab39c16b892b1437cbace16245132713057dcc45a3879bfa3cc6512615e6177b9ebb55facc75d893d769
|
7
|
+
data.tar.gz: '095e8de179697c6c07278e99ace552ab8f21ee025408a0617fbe4148d71fcaf12cf09b884ec648d9054c30eef8e191c7a2b6395a73a0c7c965d8603ac20eb458'
|
@@ -100,6 +100,7 @@ module WorkflowManager
|
|
100
100
|
end
|
101
101
|
end
|
102
102
|
class RedisDB
|
103
|
+
attr_accessor :port
|
103
104
|
def run_redis_server(redis_conf)
|
104
105
|
@pid = fork do
|
105
106
|
exec("redis-server #{redis_conf}")
|
@@ -108,11 +109,13 @@ module WorkflowManager
|
|
108
109
|
Process.waitpid @pid
|
109
110
|
end
|
110
111
|
end
|
111
|
-
def initialize(db_no=0, redis_conf
|
112
|
+
def initialize(db_no=0, redis_conf)
|
112
113
|
if db_no==0
|
113
114
|
run_redis_server(redis_conf)
|
114
115
|
end
|
115
|
-
|
116
|
+
conf = Hash[*CSV.readlines(redis_conf, col_sep: " ").map{|a| [a.first, a[1,100].join(",")]}.flatten]
|
117
|
+
@port = (conf["port"]||6379).to_i
|
118
|
+
@db = Redis.new(port: @port, db: db_no)
|
116
119
|
end
|
117
120
|
def transaction
|
118
121
|
#@db.multi do
|
@@ -154,7 +157,7 @@ module WorkflowManager
|
|
154
157
|
when "KyotoCabinet"
|
155
158
|
KyotoDB.new(@db_logs)
|
156
159
|
when "Redis"
|
157
|
-
RedisDB.new(1)
|
160
|
+
RedisDB.new(1, @redis_conf)
|
158
161
|
end
|
159
162
|
|
160
163
|
@system_log = File.join(@log_dir, "system.log")
|
@@ -163,6 +166,7 @@ module WorkflowManager
|
|
163
166
|
puts("DB = #{DB_MODE}")
|
164
167
|
if DB_MODE == "Redis"
|
165
168
|
puts("Redis conf = #{config.redis_conf}")
|
169
|
+
puts("Redis port = #{@logs.port}")
|
166
170
|
end
|
167
171
|
puts("Cluster = #{@cluster.name}")
|
168
172
|
log_puts("DB = #{DB_MODE}")
|