junkie 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/junkie/pyload/observer.rb +19 -11
- data/lib/junkie/version.rb +1 -1
- metadata +2 -2
@@ -113,22 +113,30 @@ module Junkie
|
|
113
113
|
def monitor_progress
|
114
114
|
log.debug("Watchdog timer has been fired")
|
115
115
|
in_fiber {
|
116
|
-
catch(:break)
|
117
|
-
queue_data = get_queue_data
|
116
|
+
catch(:break) do
|
118
117
|
|
119
|
-
|
120
|
-
|
118
|
+
begin
|
119
|
+
queue_data = get_queue_data
|
121
120
|
|
122
|
-
|
123
|
-
|
121
|
+
# check for empty queue and disable watchdog if needed
|
122
|
+
check_for_empty_queue(queue_data)
|
124
123
|
|
125
|
-
|
124
|
+
# extract package IDs and map them to current downloads
|
125
|
+
update_package_ids(queue_data)
|
126
126
|
|
127
|
-
|
128
|
-
|
127
|
+
check_for_failed_links(queue_data)
|
128
|
+
|
129
|
+
check_for_complete_packages(queue_data)
|
130
|
+
|
131
|
+
rescue Junkie::InvalidResponse => e
|
132
|
+
log.error(
|
133
|
+
"Pyload returns InvalidResponse (#{e}), I will ignore this")
|
134
|
+
rescue Exception => e
|
135
|
+
log.error(
|
136
|
+
"an unexpected error is occured (#{e}), I will ignore this")
|
137
|
+
end
|
138
|
+
end
|
129
139
|
}
|
130
|
-
rescue Junkie::InvalidResponse => e
|
131
|
-
log.error("Pyload returns InvalidResponse (#{e}), I will ignore this")
|
132
140
|
end
|
133
141
|
|
134
142
|
|
data/lib/junkie/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: junkie
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
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: 2012-12-
|
12
|
+
date: 2012-12-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: eventmachine
|