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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 756e5e77635428dc2ec0fd138670ac328ba192d0
4
- data.tar.gz: dd8ac350a16fd5cce2c82b311c2389088c51a865
3
+ metadata.gz: 9ae68e873fe5e7e634110966042264a149da5f8b
4
+ data.tar.gz: 18100d92938dc47517cbcb0b058c4b309e2cbe96
5
5
  SHA512:
6
- metadata.gz: 157f3548fecdb91b9f53fa2a1286792450ddf567cc3c03b4bd172249f9de35153b4c66f716146e4b783d10b6d5cde6300545aff49c9c6ce8afc8a2aa1c6aefa9
7
- data.tar.gz: 25304ceaa3c8dfc8d24bd519b40069383dc2bf55690054fd50b1cac84a5618c93b4f2954cf4970b31d14450df42f581c8bb7112e04c26e1951b58c2dad6318fd
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}", false )
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
 
@@ -1,3 +1,3 @@
1
1
  module Caddie
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
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.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-10 00:00:00.000000000 Z
11
+ date: 2016-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails