c3s 0.4.3 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- data/Manifest +1 -0
- data/Rakefile +1 -1
- data/c3s.gemspec +3 -3
- data/lib/c3s.rb +1 -1
- data/lib/republisher.rb +11 -10
- metadata +5 -5
data/Manifest
CHANGED
data/Rakefile
CHANGED
data/c3s.gemspec
CHANGED
@@ -2,15 +2,15 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{c3s}
|
5
|
-
s.version = "0.4.
|
5
|
+
s.version = "0.4.5"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Ricardo Otero"]
|
9
|
-
s.date = %q{2010-10
|
9
|
+
s.date = %q{2010-11-10}
|
10
10
|
s.description = %q{C3s library gem.}
|
11
11
|
s.email = %q{oterosantos@gmail.com}
|
12
12
|
s.extra_rdoc_files = ["README.rdoc", "lib/c3s.rb", "lib/c3s_logger.rb", "lib/component.rb", "lib/component_connection.rb", "lib/configreader.rb", "lib/databaseadapter.rb", "lib/model.rb", "lib/pubsub/node.rb", "lib/pubsub/nodetracker.rb", "lib/pubsub/publisher.rb", "lib/pubsub/subscriber.rb", "lib/republisher.rb"]
|
13
|
-
s.files = ["README.rdoc", "Rakefile", "
|
13
|
+
s.files = ["README.rdoc", "Rakefile", "lib/c3s.rb", "lib/c3s_logger.rb", "lib/component.rb", "lib/component_connection.rb", "lib/configreader.rb", "lib/databaseadapter.rb", "lib/model.rb", "lib/pubsub/node.rb", "lib/pubsub/nodetracker.rb", "lib/pubsub/publisher.rb", "lib/pubsub/subscriber.rb", "lib/republisher.rb", "Manifest", "c3s.gemspec"]
|
14
14
|
s.homepage = %q{http://github.com/rikas/c3s}
|
15
15
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "C3s", "--main", "README.rdoc"]
|
16
16
|
s.require_paths = ["lib"]
|
data/lib/c3s.rb
CHANGED
data/lib/republisher.rb
CHANGED
@@ -17,7 +17,7 @@ module C3s
|
|
17
17
|
# will receive context.
|
18
18
|
def connect
|
19
19
|
super
|
20
|
-
subscribe_nodes()
|
20
|
+
#subscribe_nodes()
|
21
21
|
end
|
22
22
|
|
23
23
|
##
|
@@ -64,16 +64,17 @@ module C3s
|
|
64
64
|
# Handles the publicated items and the republishing on new node(s)
|
65
65
|
def handle_items_publication(items)
|
66
66
|
items.each_element("//item/") do |item|
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
67
|
+
begin
|
68
|
+
c3snode.provider = config['name'] # TODO - assuming that provider_name.eql?(pubsub_root_nodes)
|
69
|
+
t = Thread.new do
|
70
|
+
# This must be implemented on the republisher
|
71
|
+
# because the strategy may vary from component to component.
|
72
|
+
republish(c3snode, item)
|
73
|
+
end
|
74
|
+
t.join
|
75
|
+
rescue Exception => e
|
76
|
+
$LOG.error "Error on published item: #{e}"
|
73
77
|
end
|
74
|
-
t.join
|
75
|
-
rescue Exception => e
|
76
|
-
$LOG.error "Error on published item: #{e}"
|
77
78
|
end
|
78
79
|
rescue Exception => e
|
79
80
|
$LOG.error "Error on handle_msg(): #{e.inspect} #{e.backtrace.join("\n")}"
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: c3s
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 5
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 5
|
10
|
+
version: 0.4.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ricardo Otero
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-10
|
18
|
+
date: 2010-11-10 00:00:00 +00:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|
@@ -42,7 +42,6 @@ extra_rdoc_files:
|
|
42
42
|
files:
|
43
43
|
- README.rdoc
|
44
44
|
- Rakefile
|
45
|
-
- c3s.gemspec
|
46
45
|
- lib/c3s.rb
|
47
46
|
- lib/c3s_logger.rb
|
48
47
|
- lib/component.rb
|
@@ -56,6 +55,7 @@ files:
|
|
56
55
|
- lib/pubsub/subscriber.rb
|
57
56
|
- lib/republisher.rb
|
58
57
|
- Manifest
|
58
|
+
- c3s.gemspec
|
59
59
|
has_rdoc: true
|
60
60
|
homepage: http://github.com/rikas/c3s
|
61
61
|
licenses: []
|