caddie 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3089a26de9669bffa1d4617c5b7ee4ea487b2412
|
4
|
+
data.tar.gz: 73a2424ac11b7a953e1ab9b71a0aa3a5fca621ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39de99333daa8ad082c77154e049460d77ac0d5ea17e185aade135ac80d986275346d6de1b2d55820b748a23e5d281f8e6254eecf412129a3a6801be3da23e4c
|
7
|
+
data.tar.gz: 57cac46d84956ce24ab4179b5df0e603b96cac38d401b833d0474398508c67a3291100cf3c54ef481e784f30eeac19dcfe2d4b460ecc3aeec773a07b8487604c
|
@@ -33,7 +33,14 @@ module Caddie
|
|
33
33
|
|
34
34
|
eve_item_id, region_id, cpp_eve_item_id, cpp_region_id = row
|
35
35
|
# puts "Requesting : #{cpp_region_id}, #{cpp_eve_item_id}"
|
36
|
-
|
36
|
+
|
37
|
+
items, connections_count = 0
|
38
|
+
begin
|
39
|
+
items, connections_count = get_markets( cpp_region_id, cpp_eve_item_id )
|
40
|
+
rescue OpenURI::HTTPError => e
|
41
|
+
puts e.inspect
|
42
|
+
end
|
43
|
+
|
37
44
|
total_connections_counts += connections_count
|
38
45
|
|
39
46
|
ActiveRecord::Base.transaction do
|
@@ -30,6 +30,7 @@ class Caddie::MThreadedUpdater
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def split_work_for_threads
|
33
|
+
puts 'Start splitting work for threads'
|
33
34
|
ids = @daily_operations_list.pluck( :id )
|
34
35
|
ActiveRecord::Base.transaction do
|
35
36
|
slice_size = ids.count/@max_threads + 1
|
@@ -38,6 +39,7 @@ class Caddie::MThreadedUpdater
|
|
38
39
|
@daily_operations_list.where( id: ids_slice ).update_all( thread_slice_id: thread_id )
|
39
40
|
end
|
40
41
|
end
|
42
|
+
puts 'Finished splitting work for threads'
|
41
43
|
end
|
42
44
|
|
43
45
|
end
|
data/lib/caddie/version.rb
CHANGED