caddie 0.1.0 → 0.1.1
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 +1 -1
- data/app/models/caddie/update_table.sql +10 -10
- data/db/migrate/20160710163612_add_total_inserts_to_crest_price_history_update_log.rb +5 -0
- data/db/migrate/20160710163641_add_co_seconds_to_crest_price_history_update_log.rb +5 -0
- data/lib/caddie/version.rb +1 -1
- data/lib/tasks/caddie_tasks.rake +2 -2
- data/test/dummy/log/development.log +5 -0
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 756e5e77635428dc2ec0fd138670ac328ba192d0
|
4
|
+
data.tar.gz: dd8ac350a16fd5cce2c82b311c2389088c51a865
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 157f3548fecdb91b9f53fa2a1286792450ddf567cc3c03b4bd172249f9de35153b4c66f716146e4b783d10b6d5cde6300545aff49c9c6ce8afc8a2aa1c6aefa9
|
7
|
+
data.tar.gz: 25304ceaa3c8dfc8d24bd519b40069383dc2bf55690054fd50b1cac84a5618c93b4f2954cf4970b31d14450df42f581c8bb7112e04c26e1951b58c2dad6318fd
|
@@ -7,7 +7,7 @@ module Caddie
|
|
7
7
|
|
8
8
|
def get_markets( region_id, type_id )
|
9
9
|
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}",
|
10
|
+
items, connections_count = get_multipage_data( "market/#{region_id}/history/?type=#{type_url}", false )
|
11
11
|
[ items, connections_count ]
|
12
12
|
end
|
13
13
|
|
@@ -28,13 +28,13 @@ UPDATE caddie_crest_price_history_updates cphu SET nb_days = ( CURRENT_DATE - ma
|
|
28
28
|
|
29
29
|
UPDATE caddie_crest_price_history_updates cphu
|
30
30
|
SET process_queue = 'DAILY', next_process_date = current_date, process_queue_priority = 1
|
31
|
-
WHERE nb_days <=
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
31
|
+
WHERE nb_days <= 7;
|
32
|
+
|
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
|
35
|
+
WHERE nb_days <= 30 AND nb_days > 7;
|
36
|
+
|
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
|
39
|
+
WHERE nb_days > 30 OR nb_days IS NULL;
|
40
|
+
|
data/lib/caddie/version.rb
CHANGED
data/lib/tasks/caddie_tasks.rake
CHANGED
@@ -19,8 +19,8 @@ namespace :caddie do
|
|
19
19
|
end_feeding_time = Time.now
|
20
20
|
feeding_time = end_feeding_time - end_update_time
|
21
21
|
|
22
|
-
Caddie::CrestPriceHistoryUpdateLog.create!(
|
23
|
-
|
22
|
+
Caddie::CrestPriceHistoryUpdateLog.create!( feed_date: feed_date, update_planning_time: update_planning_time,
|
23
|
+
feeding_time: feeding_time, total_inserts: total_inserts, co_seconds: total_connections.to_f / total_time )
|
24
24
|
|
25
25
|
end
|
26
26
|
end
|
@@ -54291,3 +54291,8 @@ Could not log "sql.active_record" event. Interrupt: ["/home/ced/.rvm/gems/ruby-
|
|
54291
54291
|
[1m[35m (0.4ms)[0m BEGIN
|
54292
54292
|
[1m[36m (1.9ms)[0m [1mSELECT "crest_price_histories"."day_timestamp" FROM "crest_price_histories" WHERE "crest_price_histories"."region_id" = $1 AND "crest_price_histories"."eve_item_id" = $2[0m [["region_id", 49], ["eve_item_id", 2362]]
|
54293
54293
|
[1m[35m (0.6ms)[0m COMMIT
|
54294
|
+
[1m[36mActiveRecord::SchemaMigration Load (1.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
54295
|
+
Migrating to CreateCaddieCrestPriceHistoryUpdates (20160524122651)
|
54296
|
+
[1m[35m (0.1ms)[0m BEGIN
|
54297
|
+
[1m[36m (9.6ms)[0m [1mCREATE TABLE "caddie_crest_price_history_updates" ("id" serial primary key, "eve_item_id" integer, "region_id" integer, "max_update" date, "max_eve_item_create" date, "max_region_create" date, "max_date" date, "nb_days" integer, "process_queue" character varying, "process_queue_priority" integer, "next_process_date" date, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
54298
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zuger Cédric
|
@@ -77,6 +77,8 @@ files:
|
|
77
77
|
- db/migrate/20160524122651_create_caddie_crest_price_history_updates.rb
|
78
78
|
- db/migrate/20160527152027_add_thread_slice_id_to_caddie_crest_price_history_updates.rb
|
79
79
|
- db/migrate/20160707153021_create_caddie_crest_price_history_update_logs.rb
|
80
|
+
- db/migrate/20160710163612_add_total_inserts_to_crest_price_history_update_log.rb
|
81
|
+
- db/migrate/20160710163641_add_co_seconds_to_crest_price_history_update_log.rb
|
80
82
|
- lib/caddie.rb
|
81
83
|
- lib/caddie/engine.rb
|
82
84
|
- lib/caddie/version.rb
|