caddie 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/caddie/crest_data_retriever.rb +5 -1
- data/app/models/caddie/update_table.sql +3 -3
- data/lib/caddie/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ae68e873fe5e7e634110966042264a149da5f8b
|
4
|
+
data.tar.gz: 18100d92938dc47517cbcb0b058c4b309e2cbe96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7a9babedd01608b5b19751525e57fe7127e056b7410df5c130d783c41cd3e6c9f1620e7b5c21e13c046f437b4730d0ca0779288b4d5c3186e55502c23f1ddf6
|
7
|
+
data.tar.gz: f9ff63e670a1bd2bc334c405b4cb9ad47a944bd23ee7950a2fbfe3925bc637111eeec735400ef091743ab0c8a98d4c730b27f78e44557112f42f2aa4bd71cf31
|
@@ -6,8 +6,12 @@ module Caddie
|
|
6
6
|
CREST_BASE_URL='https://crest-tq.eveonline.com/'
|
7
7
|
|
8
8
|
def get_markets( region_id, type_id )
|
9
|
+
|
10
|
+
debug = ENV[ 'CADDIE_DEBUG_MODE' ] && ENV[ 'CADDIE_DEBUG_MODE' ].downcase == 'true'
|
11
|
+
|
9
12
|
type_url = "https://crest-tq.eveonline.com/inventory/types/#{type_id}"
|
10
|
-
items, connections_count = get_multipage_data( "market/#{region_id}/history/?type=#{type_url}",
|
13
|
+
items, connections_count = get_multipage_data( "market/#{region_id}/history/?type=#{type_url}", debug )
|
14
|
+
|
11
15
|
[ items, connections_count ]
|
12
16
|
end
|
13
17
|
|
@@ -27,14 +27,14 @@ UPDATE caddie_crest_price_history_updates cphu SET max_date = GREATEST( max_upda
|
|
27
27
|
UPDATE caddie_crest_price_history_updates cphu SET nb_days = ( CURRENT_DATE - max_date );
|
28
28
|
|
29
29
|
UPDATE caddie_crest_price_history_updates cphu
|
30
|
-
SET process_queue = 'DAILY', next_process_date = current_date, process_queue_priority = 1
|
30
|
+
SET process_queue = 'DAILY', next_process_date = current_date, process_queue_priority = 1, updated_at = localtimestamp
|
31
31
|
WHERE nb_days <= 7;
|
32
32
|
|
33
33
|
UPDATE caddie_crest_price_history_updates cphu
|
34
|
-
SET process_queue = 'WEEKLY', next_process_date = date_trunc( 'week', ( current_date + ( interval '1 week' ) ) ), process_queue_priority = 2
|
34
|
+
SET process_queue = 'WEEKLY', next_process_date = date_trunc( 'week', ( current_date + ( interval '1 week' ) ) ), process_queue_priority = 2, updated_at = localtimestamp
|
35
35
|
WHERE nb_days <= 30 AND nb_days > 7;
|
36
36
|
|
37
37
|
UPDATE caddie_crest_price_history_updates cphu
|
38
|
-
SET process_queue = 'MONTHLY', next_process_date = date_trunc( 'month', ( current_date + ( interval '1 month' ) ) ), process_queue_priority = 3
|
38
|
+
SET process_queue = 'MONTHLY', next_process_date = date_trunc( 'month', ( current_date + ( interval '1 month' ) ) ), process_queue_priority = 3, updated_at = localtimestamp
|
39
39
|
WHERE nb_days > 30 OR nb_days IS NULL;
|
40
40
|
|
data/lib/caddie/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: caddie
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zuger Cédric
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07-
|
11
|
+
date: 2016-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|