factor 0.1.03 → 0.1.04
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/client/client.rb +2 -1
- data/lib/runtime/engine.rb +2 -2
- data/lib/runtime/message_bus.rb +2 -8
- metadata +3 -3
data/lib/client/client.rb
CHANGED
@@ -77,7 +77,8 @@ module Factor
|
|
77
77
|
# unzip download zip into unzipped directory
|
78
78
|
unzip(temp_file.path,unzip_dir)
|
79
79
|
|
80
|
-
|
80
|
+
code.call(channel.to_json)
|
81
|
+
filename = unzip_dir + "/" + channel['module_name'].split(/(?=[A-Z])/).map{ |x| x.downcase }.join('_') + ".rb"
|
81
82
|
|
82
83
|
code.call("loading '#{filename}' into engine")
|
83
84
|
engine.load_channel(filename)
|
data/lib/runtime/engine.rb
CHANGED
@@ -52,7 +52,7 @@ module Factor
|
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
55
|
-
def launch workflow, params
|
55
|
+
def launch workflow, params, keep_open=false
|
56
56
|
instance_id=SecureRandom.hex
|
57
57
|
|
58
58
|
@message_bus.start do
|
@@ -61,7 +61,7 @@ module Factor
|
|
61
61
|
message.workflow=workflow
|
62
62
|
message.add_values params
|
63
63
|
message.workflow_instance_id= instance_id
|
64
|
-
@message_bus.
|
64
|
+
@message_bus.send message, !keep_open
|
65
65
|
end
|
66
66
|
instance_id
|
67
67
|
end
|
data/lib/runtime/message_bus.rb
CHANGED
@@ -42,15 +42,9 @@ module Factor
|
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
45
|
-
def send(message)
|
45
|
+
def send(message,close=false)
|
46
46
|
@exchange.publish(message.payload,:routing_key => message.route)
|
47
|
-
|
48
|
-
|
49
|
-
def send_and_close(message)
|
50
|
-
send(message)
|
51
|
-
|
52
|
-
EM.add_timer(1, Proc.new { close})
|
53
|
-
|
47
|
+
EM.add_timer(1, Proc.new { close}) if close
|
54
48
|
end
|
55
49
|
|
56
50
|
def close
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: factor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.04
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-02-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|
@@ -124,7 +124,7 @@ dependencies:
|
|
124
124
|
- !ruby/object:Gem::Version
|
125
125
|
version: 0.9.8
|
126
126
|
description: Friendly command-line interface and library for Factor
|
127
|
-
email: maciej@
|
127
|
+
email: maciej@factor.io
|
128
128
|
executables:
|
129
129
|
- factor
|
130
130
|
extensions: []
|