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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 11c00265553f6ee24f60116455ad308ce4f880ca
4
- data.tar.gz: 7a76ec915498d09ec76e8504ffd9c53bf2b68954
3
+ metadata.gz: '08c87b93bcb1fc9aadd48bea307f1543787acf79'
4
+ data.tar.gz: 89fd672a4e1ec7929c6e7dbf19597bed82afc110
5
5
  SHA512:
6
- metadata.gz: fd80735df1170477400d0501bd4c5407598f48560c6af06d3acadc82f93c95f64371b0b0829681710712476b3465063eda608bf89122f83457664676de819f9c
7
- data.tar.gz: f4809de592cddf922cb6c7d3b0d85e3936503d1bf97c82e96107f1a7dcf5984f09b7abd72abe50f56c1a1db9234bcf7e454f44ec78875c2ad95d2ea5b3bbe7ed
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=nil)
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
- @db = Redis.new(db: db_no)
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}")
@@ -1,3 +1,3 @@
1
1
  module WorkflowManager
2
- VERSION = "0.5.1"
2
+ VERSION = "0.5.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: workflow_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Functional Genomics Center Zurich