orb_def 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +16 -0
- data/app/controllers/orb_def/api/v1/fires_controller.rb +3 -8
- data/db/migrate/20200428063630_create_orb_def_fires.rb +2 -1
- data/lib/orb_def/version.rb +1 -1
- data/spec/dummy/db/schema.rb +3 -2
- data/spec/dummy/log/development.log +322 -0
- data/spec/dummy/log/test.log +330 -0
- data/spec/dummy/tmp/development_secret.txt +1 -0
- metadata +7 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 43db273571726b0a6c3182047428c3ff119102d86bd3169c6f4ad61b32b758dd
|
4
|
+
data.tar.gz: 8e263d2142fc74bfb1741131b573cd2f4deddcce665f055f84806f164d97dfeb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2811909085fdcb3a471a0b7a82875ee09f458e9ee3b6e1a2f0afa14b5029d9a7280448bdad1e58ab78796348bbbdf33bff04ddaa9d8febd14d3c9edea2947a19
|
7
|
+
data.tar.gz: 3334406cdfb028e2c10e5a8c102521e7fbf05c76d76678e4b3763da9a90aafca556eb3928348157b3384f9b09655227c0bb9011bdd66e2950dd7e623abcd3f97
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -40,6 +40,22 @@ Populate the DB with required seed information:
|
|
40
40
|
$ rails orb_def:seed_db
|
41
41
|
```
|
42
42
|
|
43
|
+
Import all fires with their weather readings:
|
44
|
+
```ruby
|
45
|
+
OrbDef::FirmsImport.all
|
46
|
+
```
|
47
|
+
|
48
|
+
You can then hit the api/v1/search endpoint:
|
49
|
+
```bash
|
50
|
+
http://localhost:3000/api/v1/fires/search?sw_bound_point=22,22&ne_bound_point=22.325,23.345345&page=1
|
51
|
+
```
|
52
|
+
|
53
|
+
or you can call the fire model directly:
|
54
|
+
```ruby
|
55
|
+
OrbDef::Fire.in_last_24_hours.in_bounds([sw_bound_point, ne_bound_point])
|
56
|
+
OrbDef::Fire.in_last_24_hours.within(10, origin: [latitude, longitude])
|
57
|
+
OrbDef::Fire.within(10, origin: [latitude, longitude])
|
58
|
+
```
|
43
59
|
## Contributing
|
44
60
|
Fell free to contribute by opening cloning the repo and opening a PR.
|
45
61
|
|
@@ -10,7 +10,9 @@ module OrbDef
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def search
|
13
|
-
|
13
|
+
@pagy, @records = pagy(Fire.in_last_24_hours.in_bounds([sw_bound_point, ne_bound_point]), items: 100)
|
14
|
+
|
15
|
+
render json: @records, status: :ok, each_serializer: Api::V1::FireSerializer
|
14
16
|
end
|
15
17
|
|
16
18
|
def fires_current_wind_direction_indicator
|
@@ -29,13 +31,6 @@ module OrbDef
|
|
29
31
|
|
30
32
|
private
|
31
33
|
|
32
|
-
def fire_params
|
33
|
-
params.permit(:sw_bound_point, :ne_bound_point)
|
34
|
-
end
|
35
|
-
|
36
|
-
def fires_in_bounds
|
37
|
-
@fires_in_bounds ||= Fire.in_last_24_hours.in_bounds([sw_bound_point, ne_bound_point])
|
38
|
-
end
|
39
34
|
def sw_bound_point
|
40
35
|
@sw_bound_point ||= Geokit::LatLng.new(get_lat(sw_lat_lng), get_lng(sw_lat_lng))
|
41
36
|
end
|
@@ -2,7 +2,7 @@ class CreateOrbDefFires < ActiveRecord::Migration[5.2]
|
|
2
2
|
def change
|
3
3
|
create_table :orb_def_fires do |t|
|
4
4
|
t.belongs_to :weather_station, index: true
|
5
|
-
t.belongs_to :
|
5
|
+
t.belongs_to :weather_reading, index: true
|
6
6
|
t.belongs_to :detection_type
|
7
7
|
t.float :latitude, precision: 10, scale: 6, index: true
|
8
8
|
t.float :longitude, precision: 10, scale: 6, index: true
|
@@ -21,6 +21,7 @@ class CreateOrbDefFires < ActiveRecord::Migration[5.2]
|
|
21
21
|
t.string :confidence
|
22
22
|
t.string :version
|
23
23
|
t.string :day_night
|
24
|
+
t.bigint :detected_at_weather_reading_id
|
24
25
|
t.timestamp :detected_at, index: true, uniqueness: false
|
25
26
|
t.timestamps
|
26
27
|
end
|
data/lib/orb_def/version.rb
CHANGED
data/spec/dummy/db/schema.rb
CHANGED
@@ -23,7 +23,7 @@ ActiveRecord::Schema.define(version: 2020_04_28_063630) do
|
|
23
23
|
|
24
24
|
create_table "orb_def_fires", force: :cascade do |t|
|
25
25
|
t.bigint "weather_station_id"
|
26
|
-
t.bigint "
|
26
|
+
t.bigint "weather_reading_id"
|
27
27
|
t.bigint "detection_type_id"
|
28
28
|
t.float "latitude"
|
29
29
|
t.float "longitude"
|
@@ -42,16 +42,17 @@ ActiveRecord::Schema.define(version: 2020_04_28_063630) do
|
|
42
42
|
t.string "confidence"
|
43
43
|
t.string "version"
|
44
44
|
t.string "day_night"
|
45
|
+
t.bigint "detected_at_weather_reading_id"
|
45
46
|
t.datetime "detected_at"
|
46
47
|
t.datetime "created_at", null: false
|
47
48
|
t.datetime "updated_at", null: false
|
48
49
|
t.index ["detected_at"], name: "index_orb_def_fires_on_detected_at"
|
49
|
-
t.index ["detected_at_weather_reading_id"], name: "index_orb_def_fires_on_detected_at_weather_reading_id"
|
50
50
|
t.index ["detection_type_id"], name: "index_orb_def_fires_on_detection_type_id"
|
51
51
|
t.index ["identifier"], name: "index_orb_def_fires_on_identifier"
|
52
52
|
t.index ["lat_long"], name: "index_orb_def_fires_on_lat_long"
|
53
53
|
t.index ["latitude"], name: "index_orb_def_fires_on_latitude"
|
54
54
|
t.index ["longitude"], name: "index_orb_def_fires_on_longitude"
|
55
|
+
t.index ["weather_reading_id"], name: "index_orb_def_fires_on_weather_reading_id"
|
55
56
|
t.index ["weather_station_id"], name: "index_orb_def_fires_on_weather_station_id"
|
56
57
|
end
|
57
58
|
|
@@ -0,0 +1,322 @@
|
|
1
|
+
[1m[35m (2.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
2
|
+
↳ bin/rails:25
|
3
|
+
[1m[35m (4.6ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1[0m [["key", "environment"]]
|
4
|
+
↳ bin/rails:25
|
5
|
+
[1m[35m (0.3ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
6
|
+
↳ bin/rails:25
|
7
|
+
[1m[35m (0.3ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1[0m [["key", "environment"]]
|
8
|
+
↳ bin/rails:25
|
9
|
+
[1m[35m (0.3ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
10
|
+
↳ bin/rails:25
|
11
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1[0m [["key", "environment"]]
|
12
|
+
↳ bin/rails:25
|
13
|
+
[1m[35m (102.1ms)[0m [1m[35mDROP DATABASE IF EXISTS "orb_def_development"[0m
|
14
|
+
↳ bin/rails:25
|
15
|
+
[1m[35m (86.6ms)[0m [1m[35mDROP DATABASE IF EXISTS "orb_def_test"[0m
|
16
|
+
↳ bin/rails:25
|
17
|
+
[1m[35m (216.5ms)[0m [1m[35mCREATE DATABASE "orb_def_development" ENCODING = 'utf8'[0m
|
18
|
+
↳ bin/rails:25
|
19
|
+
[1m[35m (150.2ms)[0m [1m[35mCREATE DATABASE "orb_def_test" ENCODING = 'utf8'[0m
|
20
|
+
↳ bin/rails:25
|
21
|
+
[1m[35m (10.2ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)[0m
|
22
|
+
↳ bin/rails:25
|
23
|
+
[1m[35m (3.4ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
24
|
+
↳ bin/rails:25
|
25
|
+
[1m[35m (0.5ms)[0m [1m[34mSELECT pg_try_advisory_lock(2905996609753658505)[0m
|
26
|
+
↳ bin/rails:25
|
27
|
+
[1m[35m (0.4ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
28
|
+
↳ bin/rails:25
|
29
|
+
Migrating to CreateOrbDefWeatherStations (20200422073925)
|
30
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
31
|
+
↳ bin/rails:25
|
32
|
+
[1m[35m (5.7ms)[0m [1m[35mCREATE TABLE "orb_def_weather_stations" ("id" bigserial primary key, "name" character varying, "latitude" float, "longitude" float, "identifier" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
33
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200422073925_create_orb_def_weather_stations.rb:3
|
34
|
+
[1m[35m (1.0ms)[0m [1m[35mCREATE INDEX "index_orb_def_weather_stations_on_identifier" ON "orb_def_weather_stations" ("identifier")[0m
|
35
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200422073925_create_orb_def_weather_stations.rb:3
|
36
|
+
[1m[36mActiveRecord::SchemaMigration Create (0.4ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20200422073925"]]
|
37
|
+
↳ bin/rails:25
|
38
|
+
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
39
|
+
↳ bin/rails:25
|
40
|
+
Migrating to CreateOrbDefWeatherReadings (20200422073938)
|
41
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
42
|
+
↳ bin/rails:25
|
43
|
+
[1m[35m (7.0ms)[0m [1m[35mCREATE TABLE "orb_def_weather_readings" ("id" bigserial primary key, "weather_station_id" bigint, "identifier" character varying, "temperature" float, "pressure" float, "ground_level" float, "humidity" integer, "wind_speed" float, "wind_direction" float, "rain" float, "cloud" integer, "description" character varying, "reading_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
44
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200422073938_create_orb_def_weather_readings.rb:3
|
45
|
+
[1m[35m (0.9ms)[0m [1m[35mCREATE INDEX "index_orb_def_weather_readings_on_weather_station_id" ON "orb_def_weather_readings" ("weather_station_id")[0m
|
46
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200422073938_create_orb_def_weather_readings.rb:3
|
47
|
+
[1m[35m (0.8ms)[0m [1m[35mCREATE INDEX "index_orb_def_weather_readings_on_identifier" ON "orb_def_weather_readings" ("identifier")[0m
|
48
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200422073938_create_orb_def_weather_readings.rb:3
|
49
|
+
[1m[36mActiveRecord::SchemaMigration Create (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20200422073938"]]
|
50
|
+
↳ bin/rails:25
|
51
|
+
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
52
|
+
↳ bin/rails:25
|
53
|
+
Migrating to CreateOrbDefDetectionTypes (20200423064313)
|
54
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
55
|
+
↳ bin/rails:25
|
56
|
+
[1m[35m (4.4ms)[0m [1m[35mCREATE TABLE "orb_def_detection_types" ("id" bigserial primary key, "name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
57
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200423064313_create_orb_def_detection_types.rb:3
|
58
|
+
[1m[36mActiveRecord::SchemaMigration Create (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20200423064313"]]
|
59
|
+
↳ bin/rails:25
|
60
|
+
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
61
|
+
↳ bin/rails:25
|
62
|
+
Migrating to CreateOrbDefFires (20200428063630)
|
63
|
+
[1m[35m (0.5ms)[0m [1m[35mBEGIN[0m
|
64
|
+
↳ bin/rails:25
|
65
|
+
[1m[35m (3.5ms)[0m [1m[35mCREATE TABLE "orb_def_fires" ("id" bigserial primary key, "weather_station_id" bigint, "weather_reading_id" bigint, "detection_type_id" bigint, "latitude" float, "longitude" float, "brightness" float, "bright_t31" float, "bright_ti5" float, "bright_ti4" float, "scan" float, "track" float, "frp" float, "distance" integer, "scan_type" character varying, "identifier" character varying, "lat_long" character varying, "satellite" character varying, "confidence" character varying, "version" character varying, "day_night" character varying, "detected_at_weather_reading" bigint, "detected_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
66
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200428063630_create_orb_def_fires.rb:3
|
67
|
+
[1m[35m (0.9ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_weather_station_id" ON "orb_def_fires" ("weather_station_id")[0m
|
68
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200428063630_create_orb_def_fires.rb:3
|
69
|
+
[1m[35m (0.8ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_weather_reading_id" ON "orb_def_fires" ("weather_reading_id")[0m
|
70
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200428063630_create_orb_def_fires.rb:3
|
71
|
+
[1m[35m (0.9ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_detection_type_id" ON "orb_def_fires" ("detection_type_id")[0m
|
72
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200428063630_create_orb_def_fires.rb:3
|
73
|
+
[1m[35m (0.9ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_latitude" ON "orb_def_fires" ("latitude")[0m
|
74
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200428063630_create_orb_def_fires.rb:3
|
75
|
+
[1m[35m (0.8ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_longitude" ON "orb_def_fires" ("longitude")[0m
|
76
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200428063630_create_orb_def_fires.rb:3
|
77
|
+
[1m[35m (0.7ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_identifier" ON "orb_def_fires" ("identifier")[0m
|
78
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200428063630_create_orb_def_fires.rb:3
|
79
|
+
[1m[35m (0.8ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_lat_long" ON "orb_def_fires" ("lat_long")[0m
|
80
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200428063630_create_orb_def_fires.rb:3
|
81
|
+
[1m[35m (1.8ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_detected_at" ON "orb_def_fires" ("detected_at")[0m
|
82
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200428063630_create_orb_def_fires.rb:3
|
83
|
+
[1m[36mActiveRecord::SchemaMigration Create (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20200428063630"]]
|
84
|
+
↳ bin/rails:25
|
85
|
+
[1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
|
86
|
+
↳ bin/rails:25
|
87
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.3ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
88
|
+
↳ bin/rails:25
|
89
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
90
|
+
↳ bin/rails:25
|
91
|
+
[1m[36mActiveRecord::InternalMetadata Create (0.4ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key"[0m [["key", "environment"], ["value", "development"], ["created_at", "2020-05-08 08:43:12.869684"], ["updated_at", "2020-05-08 08:43:12.869684"]]
|
92
|
+
↳ bin/rails:25
|
93
|
+
[1m[35m (4.1ms)[0m [1m[35mCOMMIT[0m
|
94
|
+
↳ bin/rails:25
|
95
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT pg_advisory_unlock(2905996609753658505)[0m
|
96
|
+
↳ bin/rails:25
|
97
|
+
[1m[35m (0.3ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
98
|
+
↳ bin/rails:25
|
99
|
+
[1m[35m (0.7ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
100
|
+
↳ bin/rails:25
|
101
|
+
[1m[35m (0.4ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
102
|
+
↳ bin/rails:25
|
103
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
104
|
+
↳ bin/rails:25
|
105
|
+
[1m[35m (0.3ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
106
|
+
↳ bin/rails:25
|
107
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT pg_try_advisory_lock(2905996609753658505)[0m
|
108
|
+
↳ bin/rails:25
|
109
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
110
|
+
↳ bin/rails:25
|
111
|
+
Migrating to CreateOrbDefFires (20200428063630)
|
112
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
113
|
+
↳ bin/rails:25
|
114
|
+
[1m[35m (2.7ms)[0m [1m[35mDROP TABLE "orb_def_fires"[0m
|
115
|
+
↳ bin/rails:25
|
116
|
+
[1m[36mActiveRecord::SchemaMigration Destroy (0.5ms)[0m [1m[31mDELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1[0m [["version", "20200428063630"]]
|
117
|
+
↳ bin/rails:25
|
118
|
+
[1m[35m (2.9ms)[0m [1m[35mCOMMIT[0m
|
119
|
+
↳ bin/rails:25
|
120
|
+
[1m[35m (0.3ms)[0m [1m[34mSELECT pg_advisory_unlock(2905996609753658505)[0m
|
121
|
+
↳ bin/rails:25
|
122
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
123
|
+
↳ bin/rails:25
|
124
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT pg_try_advisory_lock(2905996609753658505)[0m
|
125
|
+
↳ bin/rails:25
|
126
|
+
[1m[35m (0.8ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
127
|
+
↳ bin/rails:25
|
128
|
+
Migrating to CreateOrbDefFires (20200428063630)
|
129
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
130
|
+
↳ bin/rails:25
|
131
|
+
[1m[35m (13.4ms)[0m [1m[35mCREATE TABLE "orb_def_fires" ("id" bigserial primary key, "weather_station_id" bigint, "weather_reading_id" bigint, "detection_type_id" bigint, "latitude" float, "longitude" float, "brightness" float, "bright_t31" float, "bright_ti5" float, "bright_ti4" float, "scan" float, "track" float, "frp" float, "distance" integer, "scan_type" character varying, "identifier" character varying, "lat_long" character varying, "satellite" character varying, "confidence" character varying, "version" character varying, "day_night" character varying, "detected_at_weather_reading_id" bigint, "detected_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
132
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200428063630_create_orb_def_fires.rb:3
|
133
|
+
[1m[35m (1.0ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_weather_station_id" ON "orb_def_fires" ("weather_station_id")[0m
|
134
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200428063630_create_orb_def_fires.rb:3
|
135
|
+
[1m[35m (1.1ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_weather_reading_id" ON "orb_def_fires" ("weather_reading_id")[0m
|
136
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200428063630_create_orb_def_fires.rb:3
|
137
|
+
[1m[35m (0.8ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_detection_type_id" ON "orb_def_fires" ("detection_type_id")[0m
|
138
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200428063630_create_orb_def_fires.rb:3
|
139
|
+
[1m[35m (1.0ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_latitude" ON "orb_def_fires" ("latitude")[0m
|
140
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200428063630_create_orb_def_fires.rb:3
|
141
|
+
[1m[35m (0.9ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_longitude" ON "orb_def_fires" ("longitude")[0m
|
142
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200428063630_create_orb_def_fires.rb:3
|
143
|
+
[1m[35m (1.0ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_identifier" ON "orb_def_fires" ("identifier")[0m
|
144
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200428063630_create_orb_def_fires.rb:3
|
145
|
+
[1m[35m (1.2ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_lat_long" ON "orb_def_fires" ("lat_long")[0m
|
146
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200428063630_create_orb_def_fires.rb:3
|
147
|
+
[1m[35m (1.1ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_detected_at" ON "orb_def_fires" ("detected_at")[0m
|
148
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200428063630_create_orb_def_fires.rb:3
|
149
|
+
[1m[36mActiveRecord::SchemaMigration Create (0.3ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20200428063630"]]
|
150
|
+
↳ bin/rails:25
|
151
|
+
[1m[35m (0.6ms)[0m [1m[35mCOMMIT[0m
|
152
|
+
↳ bin/rails:25
|
153
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.5ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
154
|
+
↳ bin/rails:25
|
155
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
156
|
+
↳ bin/rails:25
|
157
|
+
[1m[35m (0.2ms)[0m [1m[35mCOMMIT[0m
|
158
|
+
↳ bin/rails:25
|
159
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT pg_advisory_unlock(2905996609753658505)[0m
|
160
|
+
↳ bin/rails:25
|
161
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
162
|
+
↳ bin/rails:25
|
163
|
+
[1m[35m (0.6ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
164
|
+
↳ bin/rails:25
|
165
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
166
|
+
↳ bin/rails:25
|
167
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
168
|
+
↳ bin/rails:25
|
169
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT pg_try_advisory_lock(2905996609753658505)[0m
|
170
|
+
↳ bin/rails:25
|
171
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
172
|
+
↳ bin/rails:25
|
173
|
+
Migrating to CreateOrbDefFires (20200428063630)
|
174
|
+
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
175
|
+
↳ bin/rails:25
|
176
|
+
[1m[35m (2.3ms)[0m [1m[35mDROP TABLE "orb_def_fires"[0m
|
177
|
+
↳ bin/rails:25
|
178
|
+
[1m[36mActiveRecord::SchemaMigration Destroy (0.4ms)[0m [1m[31mDELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1[0m [["version", "20200428063630"]]
|
179
|
+
↳ bin/rails:25
|
180
|
+
[1m[35m (2.4ms)[0m [1m[35mCOMMIT[0m
|
181
|
+
↳ bin/rails:25
|
182
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT pg_advisory_unlock(2905996609753658505)[0m
|
183
|
+
↳ bin/rails:25
|
184
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
185
|
+
↳ bin/rails:25
|
186
|
+
[1m[35m (0.3ms)[0m [1m[34mSELECT pg_try_advisory_lock(2905996609753658505)[0m
|
187
|
+
↳ bin/rails:25
|
188
|
+
[1m[35m (0.9ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
189
|
+
↳ bin/rails:25
|
190
|
+
Migrating to CreateOrbDefFires (20200428063630)
|
191
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
192
|
+
↳ bin/rails:25
|
193
|
+
[1m[35m (7.1ms)[0m [1m[35mCREATE TABLE "orb_def_fires" ("id" bigserial primary key, "weather_station_id" bigint, "weather_reading_id" bigint, "detection_type_id" bigint, "latitude" float, "longitude" float, "brightness" float, "bright_t31" float, "bright_ti5" float, "bright_ti4" float, "scan" float, "track" float, "frp" float, "distance" integer, "scan_type" character varying, "identifier" character varying, "lat_long" character varying, "satellite" character varying, "confidence" character varying, "version" character varying, "day_night" character varying, "detected_at_weather_reading_id" bigint, "detected_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
194
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200428063630_create_orb_def_fires.rb:3
|
195
|
+
[1m[35m (1.4ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_weather_station_id" ON "orb_def_fires" ("weather_station_id")[0m
|
196
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200428063630_create_orb_def_fires.rb:3
|
197
|
+
[1m[35m (1.1ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_weather_reading_id" ON "orb_def_fires" ("weather_reading_id")[0m
|
198
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200428063630_create_orb_def_fires.rb:3
|
199
|
+
[1m[35m (1.0ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_detection_type_id" ON "orb_def_fires" ("detection_type_id")[0m
|
200
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200428063630_create_orb_def_fires.rb:3
|
201
|
+
[1m[35m (1.2ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_latitude" ON "orb_def_fires" ("latitude")[0m
|
202
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200428063630_create_orb_def_fires.rb:3
|
203
|
+
[1m[35m (1.0ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_longitude" ON "orb_def_fires" ("longitude")[0m
|
204
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200428063630_create_orb_def_fires.rb:3
|
205
|
+
[1m[35m (1.2ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_identifier" ON "orb_def_fires" ("identifier")[0m
|
206
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200428063630_create_orb_def_fires.rb:3
|
207
|
+
[1m[35m (0.9ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_lat_long" ON "orb_def_fires" ("lat_long")[0m
|
208
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200428063630_create_orb_def_fires.rb:3
|
209
|
+
[1m[35m (1.5ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_detected_at" ON "orb_def_fires" ("detected_at")[0m
|
210
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200428063630_create_orb_def_fires.rb:3
|
211
|
+
[1m[36mActiveRecord::SchemaMigration Create (0.3ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20200428063630"]]
|
212
|
+
↳ bin/rails:25
|
213
|
+
[1m[35m (0.6ms)[0m [1m[35mCOMMIT[0m
|
214
|
+
↳ bin/rails:25
|
215
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.4ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
216
|
+
↳ bin/rails:25
|
217
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
218
|
+
↳ bin/rails:25
|
219
|
+
[1m[35m (0.1ms)[0m [1m[35mCOMMIT[0m
|
220
|
+
↳ bin/rails:25
|
221
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT pg_advisory_unlock(2905996609753658505)[0m
|
222
|
+
↳ bin/rails:25
|
223
|
+
[1m[35m (0.4ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
224
|
+
↳ bin/rails:25
|
225
|
+
[1m[35m (0.8ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
226
|
+
↳ bin/rails:25
|
227
|
+
[1m[35m (0.9ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1[0m [["key", "environment"]]
|
228
|
+
↳ bin/rails:25
|
229
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
230
|
+
↳ bin/rails:25
|
231
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1[0m [["key", "environment"]]
|
232
|
+
↳ bin/rails:25
|
233
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
234
|
+
↳ bin/rails:25
|
235
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1[0m [["key", "environment"]]
|
236
|
+
↳ bin/rails:25
|
237
|
+
[1m[35m (78.2ms)[0m [1m[35mDROP DATABASE IF EXISTS "orb_def_development"[0m
|
238
|
+
↳ bin/rails:25
|
239
|
+
[1m[35m (70.8ms)[0m [1m[35mDROP DATABASE IF EXISTS "orb_def_test"[0m
|
240
|
+
↳ bin/rails:25
|
241
|
+
[1m[35m (227.7ms)[0m [1m[35mCREATE DATABASE "orb_def_development" ENCODING = 'utf8'[0m
|
242
|
+
↳ bin/rails:25
|
243
|
+
[1m[35m (116.6ms)[0m [1m[35mCREATE DATABASE "orb_def_test" ENCODING = 'utf8'[0m
|
244
|
+
↳ bin/rails:25
|
245
|
+
[1m[35m (6.3ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)[0m
|
246
|
+
↳ bin/rails:25
|
247
|
+
[1m[35m (4.2ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
248
|
+
↳ bin/rails:25
|
249
|
+
[1m[35m (0.3ms)[0m [1m[34mSELECT pg_try_advisory_lock(2905996609753658505)[0m
|
250
|
+
↳ bin/rails:25
|
251
|
+
[1m[35m (0.4ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
252
|
+
↳ bin/rails:25
|
253
|
+
Migrating to CreateOrbDefWeatherStations (20200422073925)
|
254
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
255
|
+
↳ bin/rails:25
|
256
|
+
[1m[35m (5.2ms)[0m [1m[35mCREATE TABLE "orb_def_weather_stations" ("id" bigserial primary key, "name" character varying, "latitude" float, "longitude" float, "identifier" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
257
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200422073925_create_orb_def_weather_stations.rb:3
|
258
|
+
[1m[35m (1.0ms)[0m [1m[35mCREATE INDEX "index_orb_def_weather_stations_on_identifier" ON "orb_def_weather_stations" ("identifier")[0m
|
259
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200422073925_create_orb_def_weather_stations.rb:3
|
260
|
+
[1m[36mActiveRecord::SchemaMigration Create (0.5ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20200422073925"]]
|
261
|
+
↳ bin/rails:25
|
262
|
+
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
263
|
+
↳ bin/rails:25
|
264
|
+
Migrating to CreateOrbDefWeatherReadings (20200422073938)
|
265
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
266
|
+
↳ bin/rails:25
|
267
|
+
[1m[35m (4.4ms)[0m [1m[35mCREATE TABLE "orb_def_weather_readings" ("id" bigserial primary key, "weather_station_id" bigint, "identifier" character varying, "temperature" float, "pressure" float, "ground_level" float, "humidity" integer, "wind_speed" float, "wind_direction" float, "rain" float, "cloud" integer, "description" character varying, "reading_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
268
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200422073938_create_orb_def_weather_readings.rb:3
|
269
|
+
[1m[35m (1.3ms)[0m [1m[35mCREATE INDEX "index_orb_def_weather_readings_on_weather_station_id" ON "orb_def_weather_readings" ("weather_station_id")[0m
|
270
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200422073938_create_orb_def_weather_readings.rb:3
|
271
|
+
[1m[35m (1.3ms)[0m [1m[35mCREATE INDEX "index_orb_def_weather_readings_on_identifier" ON "orb_def_weather_readings" ("identifier")[0m
|
272
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200422073938_create_orb_def_weather_readings.rb:3
|
273
|
+
[1m[36mActiveRecord::SchemaMigration Create (0.3ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20200422073938"]]
|
274
|
+
↳ bin/rails:25
|
275
|
+
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
276
|
+
↳ bin/rails:25
|
277
|
+
Migrating to CreateOrbDefDetectionTypes (20200423064313)
|
278
|
+
[1m[35m (0.5ms)[0m [1m[35mBEGIN[0m
|
279
|
+
↳ bin/rails:25
|
280
|
+
[1m[35m (4.2ms)[0m [1m[35mCREATE TABLE "orb_def_detection_types" ("id" bigserial primary key, "name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
281
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200423064313_create_orb_def_detection_types.rb:3
|
282
|
+
[1m[36mActiveRecord::SchemaMigration Create (0.3ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20200423064313"]]
|
283
|
+
↳ bin/rails:25
|
284
|
+
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
285
|
+
↳ bin/rails:25
|
286
|
+
Migrating to CreateOrbDefFires (20200428063630)
|
287
|
+
[1m[35m (0.4ms)[0m [1m[35mBEGIN[0m
|
288
|
+
↳ bin/rails:25
|
289
|
+
[1m[35m (4.6ms)[0m [1m[35mCREATE TABLE "orb_def_fires" ("id" bigserial primary key, "weather_station_id" bigint, "weather_reading_id" bigint, "detection_type_id" bigint, "latitude" float, "longitude" float, "brightness" float, "bright_t31" float, "bright_ti5" float, "bright_ti4" float, "scan" float, "track" float, "frp" float, "distance" integer, "scan_type" character varying, "identifier" character varying, "lat_long" character varying, "satellite" character varying, "confidence" character varying, "version" character varying, "day_night" character varying, "detected_at_weather_reading_id" bigint, "detected_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
290
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200428063630_create_orb_def_fires.rb:3
|
291
|
+
[1m[35m (1.1ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_weather_station_id" ON "orb_def_fires" ("weather_station_id")[0m
|
292
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200428063630_create_orb_def_fires.rb:3
|
293
|
+
[1m[35m (2.0ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_weather_reading_id" ON "orb_def_fires" ("weather_reading_id")[0m
|
294
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200428063630_create_orb_def_fires.rb:3
|
295
|
+
[1m[35m (1.5ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_detection_type_id" ON "orb_def_fires" ("detection_type_id")[0m
|
296
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200428063630_create_orb_def_fires.rb:3
|
297
|
+
[1m[35m (1.0ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_latitude" ON "orb_def_fires" ("latitude")[0m
|
298
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200428063630_create_orb_def_fires.rb:3
|
299
|
+
[1m[35m (1.2ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_longitude" ON "orb_def_fires" ("longitude")[0m
|
300
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200428063630_create_orb_def_fires.rb:3
|
301
|
+
[1m[35m (1.7ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_identifier" ON "orb_def_fires" ("identifier")[0m
|
302
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200428063630_create_orb_def_fires.rb:3
|
303
|
+
[1m[35m (1.2ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_lat_long" ON "orb_def_fires" ("lat_long")[0m
|
304
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200428063630_create_orb_def_fires.rb:3
|
305
|
+
[1m[35m (1.9ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_detected_at" ON "orb_def_fires" ("detected_at")[0m
|
306
|
+
↳ /Users/jamesgascoigne-taylor/Documents/projects/open_source/orbital_defence_engine/db/migrate/20200428063630_create_orb_def_fires.rb:3
|
307
|
+
[1m[36mActiveRecord::SchemaMigration Create (0.4ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20200428063630"]]
|
308
|
+
↳ bin/rails:25
|
309
|
+
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
310
|
+
↳ bin/rails:25
|
311
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.6ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
312
|
+
↳ bin/rails:25
|
313
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
314
|
+
↳ bin/rails:25
|
315
|
+
[1m[36mActiveRecord::InternalMetadata Create (0.9ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key"[0m [["key", "environment"], ["value", "development"], ["created_at", "2020-05-08 14:27:42.478420"], ["updated_at", "2020-05-08 14:27:42.478420"]]
|
316
|
+
↳ bin/rails:25
|
317
|
+
[1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
|
318
|
+
↳ bin/rails:25
|
319
|
+
[1m[35m (0.3ms)[0m [1m[34mSELECT pg_advisory_unlock(2905996609753658505)[0m
|
320
|
+
↳ bin/rails:25
|
321
|
+
[1m[35m (0.3ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
322
|
+
↳ bin/rails:25
|
@@ -0,0 +1,330 @@
|
|
1
|
+
[1m[35m (78.3ms)[0m [1m[35mDROP DATABASE IF EXISTS "orb_def_test"[0m
|
2
|
+
[1m[35m (165.9ms)[0m [1m[35mCREATE DATABASE "orb_def_test" ENCODING = 'utf8'[0m
|
3
|
+
[1m[35mSQL (0.8ms)[0m [1m[35mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
|
4
|
+
[1m[35m (0.4ms)[0m [1m[35mDROP TABLE IF EXISTS "orb_def_detection_types" CASCADE[0m
|
5
|
+
[1m[35m (12.0ms)[0m [1m[35mCREATE TABLE "orb_def_detection_types" ("id" bigserial primary key, "name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
6
|
+
[1m[35m (0.5ms)[0m [1m[35mDROP TABLE IF EXISTS "orb_def_fires" CASCADE[0m
|
7
|
+
[1m[35m (5.6ms)[0m [1m[35mCREATE TABLE "orb_def_fires" ("id" bigserial primary key, "weather_station_id" bigint, "weather_reading_id" bigint, "detection_type_id" bigint, "latitude" float, "longitude" float, "brightness" float, "bright_t31" float, "bright_ti5" float, "bright_ti4" float, "scan" float, "track" float, "frp" float, "distance" integer, "scan_type" character varying, "identifier" character varying, "lat_long" character varying, "satellite" character varying, "confidence" character varying, "version" character varying, "day_night" character varying, "detected_at_weather_reading" bigint, "detected_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
8
|
+
[1m[35m (2.2ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_detected_at" ON "orb_def_fires" ("detected_at")[0m
|
9
|
+
[1m[35m (1.8ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_detection_type_id" ON "orb_def_fires" ("detection_type_id")[0m
|
10
|
+
[1m[35m (1.5ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_identifier" ON "orb_def_fires" ("identifier")[0m
|
11
|
+
[1m[35m (1.7ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_lat_long" ON "orb_def_fires" ("lat_long")[0m
|
12
|
+
[1m[35m (2.2ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_latitude" ON "orb_def_fires" ("latitude")[0m
|
13
|
+
[1m[35m (1.8ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_longitude" ON "orb_def_fires" ("longitude")[0m
|
14
|
+
[1m[35m (1.8ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_weather_reading_id" ON "orb_def_fires" ("weather_reading_id")[0m
|
15
|
+
[1m[35m (2.2ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_weather_station_id" ON "orb_def_fires" ("weather_station_id")[0m
|
16
|
+
[1m[35m (0.3ms)[0m [1m[35mDROP TABLE IF EXISTS "orb_def_weather_readings" CASCADE[0m
|
17
|
+
[1m[35m (7.4ms)[0m [1m[35mCREATE TABLE "orb_def_weather_readings" ("id" bigserial primary key, "weather_station_id" bigint, "identifier" character varying, "temperature" float, "pressure" float, "ground_level" float, "humidity" integer, "wind_speed" float, "wind_direction" float, "rain" float, "cloud" integer, "description" character varying, "reading_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
18
|
+
[1m[35m (1.4ms)[0m [1m[35mCREATE INDEX "index_orb_def_weather_readings_on_identifier" ON "orb_def_weather_readings" ("identifier")[0m
|
19
|
+
[1m[35m (1.8ms)[0m [1m[35mCREATE INDEX "index_orb_def_weather_readings_on_weather_station_id" ON "orb_def_weather_readings" ("weather_station_id")[0m
|
20
|
+
[1m[35m (0.2ms)[0m [1m[35mDROP TABLE IF EXISTS "orb_def_weather_stations" CASCADE[0m
|
21
|
+
[1m[35m (4.8ms)[0m [1m[35mCREATE TABLE "orb_def_weather_stations" ("id" bigserial primary key, "name" character varying, "latitude" float, "longitude" float, "identifier" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
22
|
+
[1m[35m (1.5ms)[0m [1m[35mCREATE INDEX "index_orb_def_weather_stations_on_identifier" ON "orb_def_weather_stations" ("identifier")[0m
|
23
|
+
[1m[35m (4.4ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)[0m
|
24
|
+
[1m[35m (0.6ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
25
|
+
[1m[35m (0.7ms)[0m [1m[32mINSERT INTO "schema_migrations" (version) VALUES (20200428063630)[0m
|
26
|
+
[1m[35m (0.5ms)[0m [1m[32mINSERT INTO "schema_migrations" (version) VALUES
|
27
|
+
(20200422073938),
|
28
|
+
(20200423064313),
|
29
|
+
(20200422073925);
|
30
|
+
|
31
|
+
[0m
|
32
|
+
[1m[35m (4.7ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
33
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.6ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
34
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
35
|
+
[1m[36mActiveRecord::InternalMetadata Create (0.5ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key"[0m [["key", "environment"], ["value", "test"], ["created_at", "2020-05-08 08:43:26.127786"], ["updated_at", "2020-05-08 08:43:26.127786"]]
|
36
|
+
[1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
|
37
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.2ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
38
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
39
|
+
[1m[35m (0.2ms)[0m [1m[35mCOMMIT[0m
|
40
|
+
[1m[35m (1.4ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
41
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
42
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
43
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
44
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
45
|
+
[1m[36mOrbDef::DetectionType Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "orb_def_detection_types" WHERE "orb_def_detection_types"."name" = $1 LIMIT $2[0m [["name", "Satellite"], ["LIMIT", 1]]
|
46
|
+
[1m[36mOrbDef::DetectionType Create (0.9ms)[0m [1m[32mINSERT INTO "orb_def_detection_types" ("name", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["name", "Satellite"], ["created_at", "2020-05-08 08:43:26.294869"], ["updated_at", "2020-05-08 08:43:26.294869"]]
|
47
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
48
|
+
[1m[35m (1.8ms)[0m [1m[34mSELECT COUNT(*) FROM "orb_def_fires"[0m
|
49
|
+
Nasa::FirmsClient#fetch - Started
|
50
|
+
Nasa::FirmsClient#fetch - Completed
|
51
|
+
[1m[36mOrbDef::Fire Load (0.4ms)[0m [1m[34mSELECT "orb_def_fires".* FROM "orb_def_fires" WHERE "orb_def_fires"."identifier" = $1 LIMIT $2[0m [["identifier", "ad019c89dafc50b63f903c11b492837ed5f280ce94f40344b21d4eb9c31f6c95"], ["LIMIT", 1]]
|
52
|
+
[1m[36mOrbDef::DetectionType Load (0.2ms)[0m [1m[34mSELECT "orb_def_detection_types".* FROM "orb_def_detection_types" WHERE "orb_def_detection_types"."name" = $1 LIMIT $2[0m [["name", "Satellite"], ["LIMIT", 1]]
|
53
|
+
[1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
54
|
+
[1m[36mOrbDef::DetectionType Load (0.3ms)[0m [1m[34mSELECT "orb_def_detection_types".* FROM "orb_def_detection_types" WHERE "orb_def_detection_types"."id" = $1 LIMIT $2[0m [["id", 1], ["LIMIT", 1]]
|
55
|
+
[1m[36mOrbDef::Fire Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "orb_def_fires" WHERE "orb_def_fires"."identifier" = $1 LIMIT $2[0m [["identifier", "ad019c89dafc50b63f903c11b492837ed5f280ce94f40344b21d4eb9c31f6c95"], ["LIMIT", 1]]
|
56
|
+
[1m[35m (0.1ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
|
57
|
+
[1m[36mOrbDef::WeatherStation Load (2.0ms)[0m [1m[34mSELECT "orb_def_weather_stations".* FROM "orb_def_weather_stations" WHERE (orb_def_weather_stations.latitude IS NOT NULL AND orb_def_weather_stations.longitude IS NOT NULL) AND (orb_def_weather_stations.latitude>-12.964850747578364 AND orb_def_weather_stations.latitude<-12.785149252421634 AND orb_def_weather_stations.longitude>142.2418320160664 AND orb_def_weather_stations.longitude<142.42616798393362) AND ((
|
58
|
+
(ACOS(least(1,COS(-0.2247111411942699)*COS(2.4841969375336093)*COS(RADIANS(orb_def_weather_stations.latitude))*COS(RADIANS(orb_def_weather_stations.longitude))+
|
59
|
+
COS(-0.2247111411942699)*SIN(2.4841969375336093)*COS(RADIANS(orb_def_weather_stations.latitude))*SIN(RADIANS(orb_def_weather_stations.longitude))+
|
60
|
+
SIN(-0.2247111411942699)*SIN(RADIANS(orb_def_weather_stations.latitude))))*6376.77271)
|
61
|
+
<= 10)) ORDER BY "orb_def_weather_stations"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
|
62
|
+
[1m[36mOrbDef::WeatherStation Load (0.4ms)[0m [1m[34mSELECT "orb_def_weather_stations".* FROM "orb_def_weather_stations" WHERE "orb_def_weather_stations"."identifier" = $1 LIMIT $2[0m [["identifier", "Weipa:AUS"], ["LIMIT", 1]]
|
63
|
+
[1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
64
|
+
[1m[36mOrbDef::WeatherStation Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "orb_def_weather_stations" WHERE "orb_def_weather_stations"."identifier" = $1 LIMIT $2[0m [["identifier", "Weipa:AUS"], ["LIMIT", 1]]
|
65
|
+
[1m[36mOrbDef::WeatherStation Create (0.7ms)[0m [1m[32mINSERT INTO "orb_def_weather_stations" ("name", "latitude", "longitude", "identifier", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["name", "Weipa"], ["latitude", -12.88], ["longitude", 142.33], ["identifier", "Weipa:AUS"], ["created_at", "2020-01-22 07:56:44"], ["updated_at", "2020-01-22 07:56:44"]]
|
66
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
67
|
+
[1m[36mOrbDef::WeatherReading Load (0.6ms)[0m [1m[34mSELECT "orb_def_weather_readings".* FROM "orb_def_weather_readings" WHERE "orb_def_weather_readings"."identifier" = $1 LIMIT $2[0m [["identifier", "Weipa:1579680278"], ["LIMIT", 1]]
|
68
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
69
|
+
[1m[36mOrbDef::WeatherStation Load (0.2ms)[0m [1m[34mSELECT "orb_def_weather_stations".* FROM "orb_def_weather_stations" WHERE "orb_def_weather_stations"."id" = $1 LIMIT $2[0m [["id", 1], ["LIMIT", 1]]
|
70
|
+
[1m[36mOrbDef::WeatherReading Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "orb_def_weather_readings" WHERE "orb_def_weather_readings"."identifier" = $1 LIMIT $2[0m [["identifier", "Weipa:1579680278"], ["LIMIT", 1]]
|
71
|
+
[1m[36mOrbDef::WeatherReading Create (0.5ms)[0m [1m[32mINSERT INTO "orb_def_weather_readings" ("weather_station_id", "identifier", "temperature", "pressure", "humidity", "wind_speed", "wind_direction", "description", "reading_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id"[0m [["weather_station_id", 1], ["identifier", "Weipa:1579680278"], ["temperature", 300.15], ["pressure", 1008.0], ["humidity", 78], ["wind_speed", 12.96], ["wind_direction", 270.0], ["description", "light intensity shower rain"], ["reading_at", "2020-01-22 08:04:38"], ["created_at", "2020-01-22 07:56:44"], ["updated_at", "2020-01-22 07:56:44"]]
|
72
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
73
|
+
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
74
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
|
75
|
+
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
|
76
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
77
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
78
|
+
[1m[35m (0.7ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
79
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
80
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
81
|
+
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
82
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
83
|
+
[1m[36mOrbDef::DetectionType Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "orb_def_detection_types" WHERE "orb_def_detection_types"."name" = $1 LIMIT $2[0m [["name", "Satellite"], ["LIMIT", 1]]
|
84
|
+
[1m[36mOrbDef::DetectionType Create (0.4ms)[0m [1m[32mINSERT INTO "orb_def_detection_types" ("name", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["name", "Satellite"], ["created_at", "2020-05-08 08:45:23.036410"], ["updated_at", "2020-05-08 08:45:23.036410"]]
|
85
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
86
|
+
[1m[35m (0.8ms)[0m [1m[34mSELECT COUNT(*) FROM "orb_def_fires"[0m
|
87
|
+
Nasa::FirmsClient#fetch - Started
|
88
|
+
Nasa::FirmsClient#fetch - Completed
|
89
|
+
[1m[36mOrbDef::Fire Load (0.3ms)[0m [1m[34mSELECT "orb_def_fires".* FROM "orb_def_fires" WHERE "orb_def_fires"."identifier" = $1 LIMIT $2[0m [["identifier", "ad019c89dafc50b63f903c11b492837ed5f280ce94f40344b21d4eb9c31f6c95"], ["LIMIT", 1]]
|
90
|
+
[1m[36mOrbDef::DetectionType Load (0.2ms)[0m [1m[34mSELECT "orb_def_detection_types".* FROM "orb_def_detection_types" WHERE "orb_def_detection_types"."name" = $1 LIMIT $2[0m [["name", "Satellite"], ["LIMIT", 1]]
|
91
|
+
[1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
92
|
+
[1m[36mOrbDef::DetectionType Load (0.2ms)[0m [1m[34mSELECT "orb_def_detection_types".* FROM "orb_def_detection_types" WHERE "orb_def_detection_types"."id" = $1 LIMIT $2[0m [["id", 2], ["LIMIT", 1]]
|
93
|
+
[1m[36mOrbDef::Fire Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "orb_def_fires" WHERE "orb_def_fires"."identifier" = $1 LIMIT $2[0m [["identifier", "ad019c89dafc50b63f903c11b492837ed5f280ce94f40344b21d4eb9c31f6c95"], ["LIMIT", 1]]
|
94
|
+
[1m[35m (0.1ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
|
95
|
+
[1m[36mOrbDef::WeatherStation Load (1.5ms)[0m [1m[34mSELECT "orb_def_weather_stations".* FROM "orb_def_weather_stations" WHERE (orb_def_weather_stations.latitude IS NOT NULL AND orb_def_weather_stations.longitude IS NOT NULL) AND (orb_def_weather_stations.latitude>-12.964850747578364 AND orb_def_weather_stations.latitude<-12.785149252421634 AND orb_def_weather_stations.longitude>142.2418320160664 AND orb_def_weather_stations.longitude<142.42616798393362) AND ((
|
96
|
+
(ACOS(least(1,COS(-0.2247111411942699)*COS(2.4841969375336093)*COS(RADIANS(orb_def_weather_stations.latitude))*COS(RADIANS(orb_def_weather_stations.longitude))+
|
97
|
+
COS(-0.2247111411942699)*SIN(2.4841969375336093)*COS(RADIANS(orb_def_weather_stations.latitude))*SIN(RADIANS(orb_def_weather_stations.longitude))+
|
98
|
+
SIN(-0.2247111411942699)*SIN(RADIANS(orb_def_weather_stations.latitude))))*6376.77271)
|
99
|
+
<= 10)) ORDER BY "orb_def_weather_stations"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
|
100
|
+
[1m[36mOrbDef::WeatherStation Load (0.3ms)[0m [1m[34mSELECT "orb_def_weather_stations".* FROM "orb_def_weather_stations" WHERE "orb_def_weather_stations"."identifier" = $1 LIMIT $2[0m [["identifier", "Weipa:AUS"], ["LIMIT", 1]]
|
101
|
+
[1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
102
|
+
[1m[36mOrbDef::WeatherStation Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "orb_def_weather_stations" WHERE "orb_def_weather_stations"."identifier" = $1 LIMIT $2[0m [["identifier", "Weipa:AUS"], ["LIMIT", 1]]
|
103
|
+
[1m[36mOrbDef::WeatherStation Create (0.4ms)[0m [1m[32mINSERT INTO "orb_def_weather_stations" ("name", "latitude", "longitude", "identifier", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["name", "Weipa"], ["latitude", -12.88], ["longitude", 142.33], ["identifier", "Weipa:AUS"], ["created_at", "2020-01-22 07:56:44"], ["updated_at", "2020-01-22 07:56:44"]]
|
104
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
105
|
+
[1m[36mOrbDef::WeatherReading Load (0.5ms)[0m [1m[34mSELECT "orb_def_weather_readings".* FROM "orb_def_weather_readings" WHERE "orb_def_weather_readings"."identifier" = $1 LIMIT $2[0m [["identifier", "Weipa:1579680278"], ["LIMIT", 1]]
|
106
|
+
[1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
107
|
+
[1m[36mOrbDef::WeatherStation Load (0.2ms)[0m [1m[34mSELECT "orb_def_weather_stations".* FROM "orb_def_weather_stations" WHERE "orb_def_weather_stations"."id" = $1 LIMIT $2[0m [["id", 2], ["LIMIT", 1]]
|
108
|
+
[1m[36mOrbDef::WeatherReading Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "orb_def_weather_readings" WHERE "orb_def_weather_readings"."identifier" = $1 LIMIT $2[0m [["identifier", "Weipa:1579680278"], ["LIMIT", 1]]
|
109
|
+
[1m[36mOrbDef::WeatherReading Create (0.3ms)[0m [1m[32mINSERT INTO "orb_def_weather_readings" ("weather_station_id", "identifier", "temperature", "pressure", "humidity", "wind_speed", "wind_direction", "description", "reading_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id"[0m [["weather_station_id", 2], ["identifier", "Weipa:1579680278"], ["temperature", 300.15], ["pressure", 1008.0], ["humidity", 78], ["wind_speed", 12.96], ["wind_direction", 270.0], ["description", "light intensity shower rain"], ["reading_at", "2020-01-22 08:04:38"], ["created_at", "2020-01-22 07:56:44"], ["updated_at", "2020-01-22 07:56:44"]]
|
110
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
111
|
+
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
112
|
+
[1m[35m (0.1ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
|
113
|
+
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
|
114
|
+
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
115
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
116
|
+
[1m[35m (0.7ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
117
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
118
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
119
|
+
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
120
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
121
|
+
[1m[36mOrbDef::DetectionType Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "orb_def_detection_types" WHERE "orb_def_detection_types"."name" = $1 LIMIT $2[0m [["name", "Satellite"], ["LIMIT", 1]]
|
122
|
+
[1m[36mOrbDef::DetectionType Create (0.5ms)[0m [1m[32mINSERT INTO "orb_def_detection_types" ("name", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["name", "Satellite"], ["created_at", "2020-05-08 08:46:20.528027"], ["updated_at", "2020-05-08 08:46:20.528027"]]
|
123
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
124
|
+
[1m[35m (1.1ms)[0m [1m[34mSELECT COUNT(*) FROM "orb_def_fires"[0m
|
125
|
+
Nasa::FirmsClient#fetch - Started
|
126
|
+
Nasa::FirmsClient#fetch - Completed
|
127
|
+
[1m[36mOrbDef::Fire Load (0.2ms)[0m [1m[34mSELECT "orb_def_fires".* FROM "orb_def_fires" WHERE "orb_def_fires"."identifier" = $1 LIMIT $2[0m [["identifier", "ad019c89dafc50b63f903c11b492837ed5f280ce94f40344b21d4eb9c31f6c95"], ["LIMIT", 1]]
|
128
|
+
[1m[36mOrbDef::DetectionType Load (0.3ms)[0m [1m[34mSELECT "orb_def_detection_types".* FROM "orb_def_detection_types" WHERE "orb_def_detection_types"."name" = $1 LIMIT $2[0m [["name", "Satellite"], ["LIMIT", 1]]
|
129
|
+
[1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
130
|
+
[1m[36mOrbDef::DetectionType Load (0.3ms)[0m [1m[34mSELECT "orb_def_detection_types".* FROM "orb_def_detection_types" WHERE "orb_def_detection_types"."id" = $1 LIMIT $2[0m [["id", 3], ["LIMIT", 1]]
|
131
|
+
[1m[36mOrbDef::Fire Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "orb_def_fires" WHERE "orb_def_fires"."identifier" = $1 LIMIT $2[0m [["identifier", "ad019c89dafc50b63f903c11b492837ed5f280ce94f40344b21d4eb9c31f6c95"], ["LIMIT", 1]]
|
132
|
+
[1m[35m (0.1ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
|
133
|
+
[1m[36mOrbDef::WeatherStation Load (1.2ms)[0m [1m[34mSELECT "orb_def_weather_stations".* FROM "orb_def_weather_stations" WHERE (orb_def_weather_stations.latitude IS NOT NULL AND orb_def_weather_stations.longitude IS NOT NULL) AND (orb_def_weather_stations.latitude>-12.964850747578364 AND orb_def_weather_stations.latitude<-12.785149252421634 AND orb_def_weather_stations.longitude>142.2418320160664 AND orb_def_weather_stations.longitude<142.42616798393362) AND ((
|
134
|
+
(ACOS(least(1,COS(-0.2247111411942699)*COS(2.4841969375336093)*COS(RADIANS(orb_def_weather_stations.latitude))*COS(RADIANS(orb_def_weather_stations.longitude))+
|
135
|
+
COS(-0.2247111411942699)*SIN(2.4841969375336093)*COS(RADIANS(orb_def_weather_stations.latitude))*SIN(RADIANS(orb_def_weather_stations.longitude))+
|
136
|
+
SIN(-0.2247111411942699)*SIN(RADIANS(orb_def_weather_stations.latitude))))*6376.77271)
|
137
|
+
<= 10)) ORDER BY "orb_def_weather_stations"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
|
138
|
+
[1m[36mOrbDef::WeatherStation Load (0.2ms)[0m [1m[34mSELECT "orb_def_weather_stations".* FROM "orb_def_weather_stations" WHERE "orb_def_weather_stations"."identifier" = $1 LIMIT $2[0m [["identifier", "Weipa:AUS"], ["LIMIT", 1]]
|
139
|
+
[1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
140
|
+
[1m[36mOrbDef::WeatherStation Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "orb_def_weather_stations" WHERE "orb_def_weather_stations"."identifier" = $1 LIMIT $2[0m [["identifier", "Weipa:AUS"], ["LIMIT", 1]]
|
141
|
+
[1m[36mOrbDef::WeatherStation Create (0.3ms)[0m [1m[32mINSERT INTO "orb_def_weather_stations" ("name", "latitude", "longitude", "identifier", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["name", "Weipa"], ["latitude", -12.88], ["longitude", 142.33], ["identifier", "Weipa:AUS"], ["created_at", "2020-01-22 07:56:44"], ["updated_at", "2020-01-22 07:56:44"]]
|
142
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
143
|
+
[1m[36mOrbDef::WeatherReading Load (0.4ms)[0m [1m[34mSELECT "orb_def_weather_readings".* FROM "orb_def_weather_readings" WHERE "orb_def_weather_readings"."identifier" = $1 LIMIT $2[0m [["identifier", "Weipa:1579680278"], ["LIMIT", 1]]
|
144
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
145
|
+
[1m[36mOrbDef::WeatherStation Load (0.2ms)[0m [1m[34mSELECT "orb_def_weather_stations".* FROM "orb_def_weather_stations" WHERE "orb_def_weather_stations"."id" = $1 LIMIT $2[0m [["id", 3], ["LIMIT", 1]]
|
146
|
+
[1m[36mOrbDef::WeatherReading Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "orb_def_weather_readings" WHERE "orb_def_weather_readings"."identifier" = $1 LIMIT $2[0m [["identifier", "Weipa:1579680278"], ["LIMIT", 1]]
|
147
|
+
[1m[36mOrbDef::WeatherReading Create (0.3ms)[0m [1m[32mINSERT INTO "orb_def_weather_readings" ("weather_station_id", "identifier", "temperature", "pressure", "humidity", "wind_speed", "wind_direction", "description", "reading_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id"[0m [["weather_station_id", 3], ["identifier", "Weipa:1579680278"], ["temperature", 300.15], ["pressure", 1008.0], ["humidity", 78], ["wind_speed", 12.96], ["wind_direction", 270.0], ["description", "light intensity shower rain"], ["reading_at", "2020-01-22 08:04:38"], ["created_at", "2020-01-22 07:56:44"], ["updated_at", "2020-01-22 07:56:44"]]
|
148
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
149
|
+
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
150
|
+
[1m[35m (0.1ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
|
151
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
152
|
+
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
153
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
154
|
+
[1m[35m (1.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
155
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
156
|
+
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
|
157
|
+
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
158
|
+
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
159
|
+
[1m[36mOrbDef::DetectionType Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "orb_def_detection_types" WHERE "orb_def_detection_types"."name" = $1 LIMIT $2[0m [["name", "Satellite"], ["LIMIT", 1]]
|
160
|
+
[1m[36mOrbDef::DetectionType Create (0.4ms)[0m [1m[32mINSERT INTO "orb_def_detection_types" ("name", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["name", "Satellite"], ["created_at", "2020-05-08 14:27:05.867745"], ["updated_at", "2020-05-08 14:27:05.867745"]]
|
161
|
+
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
162
|
+
[1m[35m (2.5ms)[0m [1m[34mSELECT COUNT(*) FROM "orb_def_fires"[0m
|
163
|
+
Nasa::FirmsClient#fetch - Started
|
164
|
+
Nasa::FirmsClient#fetch - Completed
|
165
|
+
[1m[36mOrbDef::Fire Load (0.3ms)[0m [1m[34mSELECT "orb_def_fires".* FROM "orb_def_fires" WHERE "orb_def_fires"."identifier" = $1 LIMIT $2[0m [["identifier", "ad019c89dafc50b63f903c11b492837ed5f280ce94f40344b21d4eb9c31f6c95"], ["LIMIT", 1]]
|
166
|
+
[1m[36mOrbDef::DetectionType Load (0.1ms)[0m [1m[34mSELECT "orb_def_detection_types".* FROM "orb_def_detection_types" WHERE "orb_def_detection_types"."name" = $1 LIMIT $2[0m [["name", "Satellite"], ["LIMIT", 1]]
|
167
|
+
[1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
168
|
+
[1m[36mOrbDef::DetectionType Load (0.2ms)[0m [1m[34mSELECT "orb_def_detection_types".* FROM "orb_def_detection_types" WHERE "orb_def_detection_types"."id" = $1 LIMIT $2[0m [["id", 4], ["LIMIT", 1]]
|
169
|
+
[1m[36mOrbDef::Fire Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "orb_def_fires" WHERE "orb_def_fires"."identifier" = $1 LIMIT $2[0m [["identifier", "ad019c89dafc50b63f903c11b492837ed5f280ce94f40344b21d4eb9c31f6c95"], ["LIMIT", 1]]
|
170
|
+
[1m[35m (0.1ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
|
171
|
+
[1m[36mOrbDef::WeatherStation Load (1.9ms)[0m [1m[34mSELECT "orb_def_weather_stations".* FROM "orb_def_weather_stations" WHERE (orb_def_weather_stations.latitude IS NOT NULL AND orb_def_weather_stations.longitude IS NOT NULL) AND (orb_def_weather_stations.latitude>-12.964850747578364 AND orb_def_weather_stations.latitude<-12.785149252421634 AND orb_def_weather_stations.longitude>142.2418320160664 AND orb_def_weather_stations.longitude<142.42616798393362) AND ((
|
172
|
+
(ACOS(least(1,COS(-0.2247111411942699)*COS(2.4841969375336093)*COS(RADIANS(orb_def_weather_stations.latitude))*COS(RADIANS(orb_def_weather_stations.longitude))+
|
173
|
+
COS(-0.2247111411942699)*SIN(2.4841969375336093)*COS(RADIANS(orb_def_weather_stations.latitude))*SIN(RADIANS(orb_def_weather_stations.longitude))+
|
174
|
+
SIN(-0.2247111411942699)*SIN(RADIANS(orb_def_weather_stations.latitude))))*6376.77271)
|
175
|
+
<= 10)) ORDER BY "orb_def_weather_stations"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
|
176
|
+
[1m[36mOrbDef::WeatherStation Load (0.4ms)[0m [1m[34mSELECT "orb_def_weather_stations".* FROM "orb_def_weather_stations" WHERE "orb_def_weather_stations"."identifier" = $1 LIMIT $2[0m [["identifier", "Weipa:AUS"], ["LIMIT", 1]]
|
177
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
178
|
+
[1m[36mOrbDef::WeatherStation Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "orb_def_weather_stations" WHERE "orb_def_weather_stations"."identifier" = $1 LIMIT $2[0m [["identifier", "Weipa:AUS"], ["LIMIT", 1]]
|
179
|
+
[1m[36mOrbDef::WeatherStation Create (0.4ms)[0m [1m[32mINSERT INTO "orb_def_weather_stations" ("name", "latitude", "longitude", "identifier", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["name", "Weipa"], ["latitude", -12.88], ["longitude", 142.33], ["identifier", "Weipa:AUS"], ["created_at", "2020-01-22 07:56:44"], ["updated_at", "2020-01-22 07:56:44"]]
|
180
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
181
|
+
[1m[36mOrbDef::WeatherReading Load (0.6ms)[0m [1m[34mSELECT "orb_def_weather_readings".* FROM "orb_def_weather_readings" WHERE "orb_def_weather_readings"."identifier" = $1 LIMIT $2[0m [["identifier", "Weipa:1579680278"], ["LIMIT", 1]]
|
182
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
183
|
+
[1m[36mOrbDef::WeatherStation Load (0.3ms)[0m [1m[34mSELECT "orb_def_weather_stations".* FROM "orb_def_weather_stations" WHERE "orb_def_weather_stations"."id" = $1 LIMIT $2[0m [["id", 4], ["LIMIT", 1]]
|
184
|
+
[1m[36mOrbDef::WeatherReading Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "orb_def_weather_readings" WHERE "orb_def_weather_readings"."identifier" = $1 LIMIT $2[0m [["identifier", "Weipa:1579680278"], ["LIMIT", 1]]
|
185
|
+
[1m[36mOrbDef::WeatherReading Create (0.3ms)[0m [1m[32mINSERT INTO "orb_def_weather_readings" ("weather_station_id", "identifier", "temperature", "pressure", "humidity", "wind_speed", "wind_direction", "description", "reading_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id"[0m [["weather_station_id", 4], ["identifier", "Weipa:1579680278"], ["temperature", 300.15], ["pressure", 1008.0], ["humidity", 78], ["wind_speed", 12.96], ["wind_direction", 270.0], ["description", "light intensity shower rain"], ["reading_at", "2020-01-22 08:04:38"], ["created_at", "2020-01-22 07:56:44"], ["updated_at", "2020-01-22 07:56:44"]]
|
186
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
187
|
+
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
188
|
+
[1m[35m (0.1ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
|
189
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
190
|
+
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
191
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
192
|
+
[1m[35m (71.5ms)[0m [1m[35mDROP DATABASE IF EXISTS "orb_def_test"[0m
|
193
|
+
[1m[35m (163.5ms)[0m [1m[35mCREATE DATABASE "orb_def_test" ENCODING = 'utf8'[0m
|
194
|
+
[1m[35mSQL (0.6ms)[0m [1m[35mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
|
195
|
+
[1m[35m (0.3ms)[0m [1m[35mDROP TABLE IF EXISTS "orb_def_detection_types" CASCADE[0m
|
196
|
+
[1m[35m (8.8ms)[0m [1m[35mCREATE TABLE "orb_def_detection_types" ("id" bigserial primary key, "name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
197
|
+
[1m[35m (0.5ms)[0m [1m[35mDROP TABLE IF EXISTS "orb_def_fires" CASCADE[0m
|
198
|
+
[1m[35m (5.5ms)[0m [1m[35mCREATE TABLE "orb_def_fires" ("id" bigserial primary key, "weather_station_id" bigint, "weather_reading_id" bigint, "detection_type_id" bigint, "latitude" float, "longitude" float, "brightness" float, "bright_t31" float, "bright_ti5" float, "bright_ti4" float, "scan" float, "track" float, "frp" float, "distance" integer, "scan_type" character varying, "identifier" character varying, "lat_long" character varying, "satellite" character varying, "confidence" character varying, "version" character varying, "day_night" character varying, "detected_at_weather_reading_id" bigint, "detected_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
199
|
+
[1m[35m (1.7ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_detected_at" ON "orb_def_fires" ("detected_at")[0m
|
200
|
+
[1m[35m (1.4ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_detection_type_id" ON "orb_def_fires" ("detection_type_id")[0m
|
201
|
+
[1m[35m (1.5ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_identifier" ON "orb_def_fires" ("identifier")[0m
|
202
|
+
[1m[35m (1.4ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_lat_long" ON "orb_def_fires" ("lat_long")[0m
|
203
|
+
[1m[35m (1.4ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_latitude" ON "orb_def_fires" ("latitude")[0m
|
204
|
+
[1m[35m (1.6ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_longitude" ON "orb_def_fires" ("longitude")[0m
|
205
|
+
[1m[35m (1.6ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_weather_reading_id" ON "orb_def_fires" ("weather_reading_id")[0m
|
206
|
+
[1m[35m (1.7ms)[0m [1m[35mCREATE INDEX "index_orb_def_fires_on_weather_station_id" ON "orb_def_fires" ("weather_station_id")[0m
|
207
|
+
[1m[35m (0.3ms)[0m [1m[35mDROP TABLE IF EXISTS "orb_def_weather_readings" CASCADE[0m
|
208
|
+
[1m[35m (4.1ms)[0m [1m[35mCREATE TABLE "orb_def_weather_readings" ("id" bigserial primary key, "weather_station_id" bigint, "identifier" character varying, "temperature" float, "pressure" float, "ground_level" float, "humidity" integer, "wind_speed" float, "wind_direction" float, "rain" float, "cloud" integer, "description" character varying, "reading_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
209
|
+
[1m[35m (1.9ms)[0m [1m[35mCREATE INDEX "index_orb_def_weather_readings_on_identifier" ON "orb_def_weather_readings" ("identifier")[0m
|
210
|
+
[1m[35m (1.4ms)[0m [1m[35mCREATE INDEX "index_orb_def_weather_readings_on_weather_station_id" ON "orb_def_weather_readings" ("weather_station_id")[0m
|
211
|
+
[1m[35m (0.3ms)[0m [1m[35mDROP TABLE IF EXISTS "orb_def_weather_stations" CASCADE[0m
|
212
|
+
[1m[35m (6.3ms)[0m [1m[35mCREATE TABLE "orb_def_weather_stations" ("id" bigserial primary key, "name" character varying, "latitude" float, "longitude" float, "identifier" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
213
|
+
[1m[35m (2.3ms)[0m [1m[35mCREATE INDEX "index_orb_def_weather_stations_on_identifier" ON "orb_def_weather_stations" ("identifier")[0m
|
214
|
+
[1m[35m (4.6ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)[0m
|
215
|
+
[1m[35m (0.8ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
216
|
+
[1m[35m (0.9ms)[0m [1m[32mINSERT INTO "schema_migrations" (version) VALUES (20200428063630)[0m
|
217
|
+
[1m[35m (0.5ms)[0m [1m[32mINSERT INTO "schema_migrations" (version) VALUES
|
218
|
+
(20200422073938),
|
219
|
+
(20200423064313),
|
220
|
+
(20200422073925);
|
221
|
+
|
222
|
+
[0m
|
223
|
+
[1m[35m (4.0ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
224
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.6ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
225
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
226
|
+
[1m[36mActiveRecord::InternalMetadata Create (0.7ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key"[0m [["key", "environment"], ["value", "test"], ["created_at", "2020-05-08 14:27:50.532065"], ["updated_at", "2020-05-08 14:27:50.532065"]]
|
227
|
+
[1m[35m (0.6ms)[0m [1m[35mCOMMIT[0m
|
228
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.4ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
229
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
230
|
+
[1m[35m (0.2ms)[0m [1m[35mCOMMIT[0m
|
231
|
+
[1m[35m (1.0ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
232
|
+
[1m[35m (0.4ms)[0m [1m[35mBEGIN[0m
|
233
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
234
|
+
[1m[35m (0.4ms)[0m [1m[35mBEGIN[0m
|
235
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
236
|
+
[1m[36mOrbDef::DetectionType Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "orb_def_detection_types" WHERE "orb_def_detection_types"."name" = $1 LIMIT $2[0m [["name", "Satellite"], ["LIMIT", 1]]
|
237
|
+
[1m[36mOrbDef::DetectionType Create (0.7ms)[0m [1m[32mINSERT INTO "orb_def_detection_types" ("name", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["name", "Satellite"], ["created_at", "2020-05-08 14:27:50.680555"], ["updated_at", "2020-05-08 14:27:50.680555"]]
|
238
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
239
|
+
[1m[35m (1.0ms)[0m [1m[34mSELECT COUNT(*) FROM "orb_def_fires"[0m
|
240
|
+
Nasa::FirmsClient#fetch - Started
|
241
|
+
Nasa::FirmsClient#fetch - Completed
|
242
|
+
[1m[36mOrbDef::Fire Load (0.6ms)[0m [1m[34mSELECT "orb_def_fires".* FROM "orb_def_fires" WHERE "orb_def_fires"."identifier" = $1 LIMIT $2[0m [["identifier", "ad019c89dafc50b63f903c11b492837ed5f280ce94f40344b21d4eb9c31f6c95"], ["LIMIT", 1]]
|
243
|
+
[1m[36mOrbDef::DetectionType Load (0.3ms)[0m [1m[34mSELECT "orb_def_detection_types".* FROM "orb_def_detection_types" WHERE "orb_def_detection_types"."name" = $1 LIMIT $2[0m [["name", "Satellite"], ["LIMIT", 1]]
|
244
|
+
[1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
245
|
+
[1m[36mOrbDef::DetectionType Load (0.3ms)[0m [1m[34mSELECT "orb_def_detection_types".* FROM "orb_def_detection_types" WHERE "orb_def_detection_types"."id" = $1 LIMIT $2[0m [["id", 1], ["LIMIT", 1]]
|
246
|
+
[1m[36mOrbDef::Fire Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "orb_def_fires" WHERE "orb_def_fires"."identifier" = $1 LIMIT $2[0m [["identifier", "ad019c89dafc50b63f903c11b492837ed5f280ce94f40344b21d4eb9c31f6c95"], ["LIMIT", 1]]
|
247
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
|
248
|
+
[1m[36mOrbDef::WeatherStation Load (2.1ms)[0m [1m[34mSELECT "orb_def_weather_stations".* FROM "orb_def_weather_stations" WHERE (orb_def_weather_stations.latitude IS NOT NULL AND orb_def_weather_stations.longitude IS NOT NULL) AND (orb_def_weather_stations.latitude>-12.964850747578364 AND orb_def_weather_stations.latitude<-12.785149252421634 AND orb_def_weather_stations.longitude>142.2418320160664 AND orb_def_weather_stations.longitude<142.42616798393362) AND ((
|
249
|
+
(ACOS(least(1,COS(-0.2247111411942699)*COS(2.4841969375336093)*COS(RADIANS(orb_def_weather_stations.latitude))*COS(RADIANS(orb_def_weather_stations.longitude))+
|
250
|
+
COS(-0.2247111411942699)*SIN(2.4841969375336093)*COS(RADIANS(orb_def_weather_stations.latitude))*SIN(RADIANS(orb_def_weather_stations.longitude))+
|
251
|
+
SIN(-0.2247111411942699)*SIN(RADIANS(orb_def_weather_stations.latitude))))*6376.77271)
|
252
|
+
<= 10)) ORDER BY "orb_def_weather_stations"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
|
253
|
+
[1m[36mOrbDef::WeatherStation Load (0.4ms)[0m [1m[34mSELECT "orb_def_weather_stations".* FROM "orb_def_weather_stations" WHERE "orb_def_weather_stations"."identifier" = $1 LIMIT $2[0m [["identifier", "Weipa:AUS"], ["LIMIT", 1]]
|
254
|
+
[1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
255
|
+
[1m[36mOrbDef::WeatherStation Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "orb_def_weather_stations" WHERE "orb_def_weather_stations"."identifier" = $1 LIMIT $2[0m [["identifier", "Weipa:AUS"], ["LIMIT", 1]]
|
256
|
+
[1m[36mOrbDef::WeatherStation Create (1.0ms)[0m [1m[32mINSERT INTO "orb_def_weather_stations" ("name", "latitude", "longitude", "identifier", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["name", "Weipa"], ["latitude", -12.88], ["longitude", 142.33], ["identifier", "Weipa:AUS"], ["created_at", "2020-01-22 07:56:44"], ["updated_at", "2020-01-22 07:56:44"]]
|
257
|
+
[1m[35m (0.3ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
258
|
+
[1m[36mOrbDef::WeatherReading Load (0.8ms)[0m [1m[34mSELECT "orb_def_weather_readings".* FROM "orb_def_weather_readings" WHERE "orb_def_weather_readings"."identifier" = $1 LIMIT $2[0m [["identifier", "Weipa:1579680278"], ["LIMIT", 1]]
|
259
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
260
|
+
[1m[36mOrbDef::WeatherStation Load (0.2ms)[0m [1m[34mSELECT "orb_def_weather_stations".* FROM "orb_def_weather_stations" WHERE "orb_def_weather_stations"."id" = $1 LIMIT $2[0m [["id", 1], ["LIMIT", 1]]
|
261
|
+
[1m[36mOrbDef::WeatherReading Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "orb_def_weather_readings" WHERE "orb_def_weather_readings"."identifier" = $1 LIMIT $2[0m [["identifier", "Weipa:1579680278"], ["LIMIT", 1]]
|
262
|
+
[1m[36mOrbDef::WeatherReading Create (0.9ms)[0m [1m[32mINSERT INTO "orb_def_weather_readings" ("weather_station_id", "identifier", "temperature", "pressure", "humidity", "wind_speed", "wind_direction", "description", "reading_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id"[0m [["weather_station_id", 1], ["identifier", "Weipa:1579680278"], ["temperature", 300.15], ["pressure", 1008.0], ["humidity", 78], ["wind_speed", 12.96], ["wind_direction", 270.0], ["description", "light intensity shower rain"], ["reading_at", "2020-01-22 08:04:38"], ["created_at", "2020-01-22 07:56:44"], ["updated_at", "2020-01-22 07:56:44"]]
|
263
|
+
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
264
|
+
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
265
|
+
[1m[36mOrbDef::WeatherStation Load (0.2ms)[0m [1m[34mSELECT "orb_def_weather_stations".* FROM "orb_def_weather_stations" WHERE "orb_def_weather_stations"."id" = $1 LIMIT $2[0m [["id", 1], ["LIMIT", 1]]
|
266
|
+
[1m[36mOrbDef::Fire Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "orb_def_fires" WHERE "orb_def_fires"."identifier" = $1 LIMIT $2[0m [["identifier", "ad019c89dafc50b63f903c11b492837ed5f280ce94f40344b21d4eb9c31f6c95"], ["LIMIT", 1]]
|
267
|
+
[1m[36mOrbDef::Fire Create (1.5ms)[0m [1m[32mINSERT INTO "orb_def_fires" ("weather_station_id", "detection_type_id", "latitude", "longitude", "brightness", "bright_t31", "scan", "track", "frp", "scan_type", "identifier", "lat_long", "satellite", "confidence", "version", "detected_at_weather_reading_id", "detected_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19) RETURNING "id"[0m [["weather_station_id", 1], ["detection_type_id", 1], ["latitude", -12.875], ["longitude", 142.334], ["brightness", 309.8], ["bright_t31", 284.4], ["scan", 1.5], ["track", 1.2], ["frp", 9.2], ["scan_type", "modis"], ["identifier", "ad019c89dafc50b63f903c11b492837ed5f280ce94f40344b21d4eb9c31f6c95"], ["lat_long", "-12.875,142.334"], ["satellite", "T"], ["confidence", "17"], ["version", "6.0NRT"], ["detected_at_weather_reading_id", 1], ["detected_at", "2020-01-22 01:05:00"], ["created_at", "2020-01-22 07:56:44"], ["updated_at", "2020-01-22 07:56:44"]]
|
268
|
+
[1m[35m (0.3ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
269
|
+
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
270
|
+
[1m[36mOrbDef::Fire Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "orb_def_fires" WHERE "orb_def_fires"."identifier" = $1 AND "orb_def_fires"."id" != $2 LIMIT $3[0m [["identifier", "ad019c89dafc50b63f903c11b492837ed5f280ce94f40344b21d4eb9c31f6c95"], ["id", 1], ["LIMIT", 1]]
|
271
|
+
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
272
|
+
[1m[36mOrbDef::Fire Load (0.4ms)[0m [1m[34mSELECT "orb_def_fires".* FROM "orb_def_fires" WHERE "orb_def_fires"."identifier" = $1 LIMIT $2[0m [["identifier", "e26a88fc14c041bae14851f4d1b6f2d2771d719f4b01c0dae45c540d01e8e078"], ["LIMIT", 1]]
|
273
|
+
[1m[36mOrbDef::DetectionType Load (0.2ms)[0m [1m[34mSELECT "orb_def_detection_types".* FROM "orb_def_detection_types" WHERE "orb_def_detection_types"."name" = $1 LIMIT $2[0m [["name", "Satellite"], ["LIMIT", 1]]
|
274
|
+
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
275
|
+
[1m[36mOrbDef::DetectionType Load (0.4ms)[0m [1m[34mSELECT "orb_def_detection_types".* FROM "orb_def_detection_types" WHERE "orb_def_detection_types"."id" = $1 LIMIT $2[0m [["id", 1], ["LIMIT", 1]]
|
276
|
+
[1m[36mOrbDef::Fire Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "orb_def_fires" WHERE "orb_def_fires"."identifier" = $1 LIMIT $2[0m [["identifier", "e26a88fc14c041bae14851f4d1b6f2d2771d719f4b01c0dae45c540d01e8e078"], ["LIMIT", 1]]
|
277
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
|
278
|
+
[1m[36mOrbDef::WeatherStation Load (0.8ms)[0m [1m[34mSELECT "orb_def_weather_stations".* FROM "orb_def_weather_stations" WHERE (orb_def_weather_stations.latitude IS NOT NULL AND orb_def_weather_stations.longitude IS NOT NULL) AND (orb_def_weather_stations.latitude>-12.967850747578366 AND orb_def_weather_stations.latitude<-12.788149252421633 AND orb_def_weather_stations.longitude>142.23483091286502 AND orb_def_weather_stations.longitude<142.41916908713497) AND ((
|
279
|
+
(ACOS(least(1,COS(-0.22476350107182974)*COS(2.4840747644859693)*COS(RADIANS(orb_def_weather_stations.latitude))*COS(RADIANS(orb_def_weather_stations.longitude))+
|
280
|
+
COS(-0.22476350107182974)*SIN(2.4840747644859693)*COS(RADIANS(orb_def_weather_stations.latitude))*SIN(RADIANS(orb_def_weather_stations.longitude))+
|
281
|
+
SIN(-0.22476350107182974)*SIN(RADIANS(orb_def_weather_stations.latitude))))*6376.77271)
|
282
|
+
<= 10)) ORDER BY "orb_def_weather_stations"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
|
283
|
+
[1m[36mOrbDef::WeatherReading Load (0.6ms)[0m [1m[34mSELECT "orb_def_weather_readings".* FROM "orb_def_weather_readings" WHERE "orb_def_weather_readings"."weather_station_id" = $1 ORDER BY "orb_def_weather_readings"."id" DESC LIMIT $2[0m [["weather_station_id", 1], ["LIMIT", 1]]
|
284
|
+
[1m[36mOrbDef::WeatherStation Load (1.0ms)[0m [1m[34mSELECT "orb_def_weather_stations".* FROM "orb_def_weather_stations" WHERE "orb_def_weather_stations"."identifier" = $1 LIMIT $2[0m [["identifier", "Weipa:AUS"], ["LIMIT", 1]]
|
285
|
+
[1m[36mOrbDef::WeatherReading Load (0.3ms)[0m [1m[34mSELECT "orb_def_weather_readings".* FROM "orb_def_weather_readings" WHERE "orb_def_weather_readings"."identifier" = $1 LIMIT $2[0m [["identifier", "Weipa:1579680278"], ["LIMIT", 1]]
|
286
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
287
|
+
[1m[36mOrbDef::WeatherStation Load (0.4ms)[0m [1m[34mSELECT "orb_def_weather_stations".* FROM "orb_def_weather_stations" WHERE "orb_def_weather_stations"."id" = $1 LIMIT $2[0m [["id", 1], ["LIMIT", 1]]
|
288
|
+
[1m[36mOrbDef::Fire Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "orb_def_fires" WHERE "orb_def_fires"."identifier" = $1 LIMIT $2[0m [["identifier", "e26a88fc14c041bae14851f4d1b6f2d2771d719f4b01c0dae45c540d01e8e078"], ["LIMIT", 1]]
|
289
|
+
[1m[36mOrbDef::Fire Create (1.3ms)[0m [1m[32mINSERT INTO "orb_def_fires" ("weather_station_id", "detection_type_id", "latitude", "longitude", "brightness", "bright_t31", "scan", "track", "frp", "scan_type", "identifier", "lat_long", "satellite", "confidence", "version", "detected_at_weather_reading_id", "detected_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19) RETURNING "id"[0m [["weather_station_id", 1], ["detection_type_id", 1], ["latitude", -12.878], ["longitude", 142.327], ["brightness", 310.4], ["bright_t31", 283.9], ["scan", 1.5], ["track", 1.2], ["frp", 11.4], ["scan_type", "modis"], ["identifier", "e26a88fc14c041bae14851f4d1b6f2d2771d719f4b01c0dae45c540d01e8e078"], ["lat_long", "-12.878,142.327"], ["satellite", "T"], ["confidence", "44"], ["version", "6.0NRT"], ["detected_at_weather_reading_id", 1], ["detected_at", "2020-01-22 01:05:00"], ["created_at", "2020-01-22 07:56:44"], ["updated_at", "2020-01-22 07:56:44"]]
|
290
|
+
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
291
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
292
|
+
[1m[36mOrbDef::Fire Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "orb_def_fires" WHERE "orb_def_fires"."identifier" = $1 AND "orb_def_fires"."id" != $2 LIMIT $3[0m [["identifier", "e26a88fc14c041bae14851f4d1b6f2d2771d719f4b01c0dae45c540d01e8e078"], ["id", 2], ["LIMIT", 1]]
|
293
|
+
[1m[35m (0.3ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
294
|
+
[1m[36mOrbDef::Fire Load (0.2ms)[0m [1m[34mSELECT "orb_def_fires".* FROM "orb_def_fires" WHERE "orb_def_fires"."identifier" = $1 LIMIT $2[0m [["identifier", "78bc15a58abecf19b2bece870707ee773cefa7f5953d04251575b96ecd8b277b"], ["LIMIT", 1]]
|
295
|
+
[1m[36mOrbDef::DetectionType Load (0.2ms)[0m [1m[34mSELECT "orb_def_detection_types".* FROM "orb_def_detection_types" WHERE "orb_def_detection_types"."name" = $1 LIMIT $2[0m [["name", "Satellite"], ["LIMIT", 1]]
|
296
|
+
[1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
297
|
+
[1m[36mOrbDef::DetectionType Load (0.3ms)[0m [1m[34mSELECT "orb_def_detection_types".* FROM "orb_def_detection_types" WHERE "orb_def_detection_types"."id" = $1 LIMIT $2[0m [["id", 1], ["LIMIT", 1]]
|
298
|
+
[1m[36mOrbDef::Fire Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "orb_def_fires" WHERE "orb_def_fires"."identifier" = $1 LIMIT $2[0m [["identifier", "78bc15a58abecf19b2bece870707ee773cefa7f5953d04251575b96ecd8b277b"], ["LIMIT", 1]]
|
299
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
|
300
|
+
[1m[36mOrbDef::WeatherStation Load (0.6ms)[0m [1m[34mSELECT "orb_def_weather_stations".* FROM "orb_def_weather_stations" WHERE (orb_def_weather_stations.latitude IS NOT NULL AND orb_def_weather_stations.longitude IS NOT NULL) AND (orb_def_weather_stations.latitude>-18.955850747578364 AND orb_def_weather_stations.latitude<-18.776149252421632 AND orb_def_weather_stations.longitude>139.2300482045209 AND orb_def_weather_stations.longitude<139.41995179547908) AND ((
|
301
|
+
(ACOS(least(1,COS(-0.32927381668125016)*COS(2.4316799803410993)*COS(RADIANS(orb_def_weather_stations.latitude))*COS(RADIANS(orb_def_weather_stations.longitude))+
|
302
|
+
COS(-0.32927381668125016)*SIN(2.4316799803410993)*COS(RADIANS(orb_def_weather_stations.latitude))*SIN(RADIANS(orb_def_weather_stations.longitude))+
|
303
|
+
SIN(-0.32927381668125016)*SIN(RADIANS(orb_def_weather_stations.latitude))))*6376.77271)
|
304
|
+
<= 10)) ORDER BY "orb_def_weather_stations"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
|
305
|
+
[1m[36mOrbDef::WeatherStation Load (0.5ms)[0m [1m[34mSELECT "orb_def_weather_stations".* FROM "orb_def_weather_stations" WHERE "orb_def_weather_stations"."identifier" = $1 LIMIT $2[0m [["identifier", "Burke:AUS"], ["LIMIT", 1]]
|
306
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
307
|
+
[1m[36mOrbDef::WeatherStation Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "orb_def_weather_stations" WHERE "orb_def_weather_stations"."identifier" = $1 LIMIT $2[0m [["identifier", "Burke:AUS"], ["LIMIT", 1]]
|
308
|
+
[1m[36mOrbDef::WeatherStation Create (0.3ms)[0m [1m[32mINSERT INTO "orb_def_weather_stations" ("name", "latitude", "longitude", "identifier", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["name", "Burke"], ["latitude", -18.87], ["longitude", 139.32], ["identifier", "Burke:AUS"], ["created_at", "2020-01-22 07:56:44"], ["updated_at", "2020-01-22 07:56:44"]]
|
309
|
+
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
310
|
+
[1m[36mOrbDef::WeatherReading Load (0.3ms)[0m [1m[34mSELECT "orb_def_weather_readings".* FROM "orb_def_weather_readings" WHERE "orb_def_weather_readings"."identifier" = $1 LIMIT $2[0m [["identifier", "Burke:1579680278"], ["LIMIT", 1]]
|
311
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
312
|
+
[1m[36mOrbDef::WeatherStation Load (0.3ms)[0m [1m[34mSELECT "orb_def_weather_stations".* FROM "orb_def_weather_stations" WHERE "orb_def_weather_stations"."id" = $1 LIMIT $2[0m [["id", 2], ["LIMIT", 1]]
|
313
|
+
[1m[36mOrbDef::WeatherReading Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "orb_def_weather_readings" WHERE "orb_def_weather_readings"."identifier" = $1 LIMIT $2[0m [["identifier", "Burke:1579680278"], ["LIMIT", 1]]
|
314
|
+
[1m[36mOrbDef::WeatherReading Create (0.5ms)[0m [1m[32mINSERT INTO "orb_def_weather_readings" ("weather_station_id", "identifier", "temperature", "pressure", "ground_level", "humidity", "wind_speed", "wind_direction", "rain", "description", "reading_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13) RETURNING "id"[0m [["weather_station_id", 2], ["identifier", "Burke:1579680278"], ["temperature", 301.13], ["pressure", 1005.0], ["ground_level", 992.0], ["humidity", 72], ["wind_speed", 25.776], ["wind_direction", 322.0], ["rain", 0.25], ["description", "light rain"], ["reading_at", "2020-01-22 08:04:38"], ["created_at", "2020-01-22 07:56:44"], ["updated_at", "2020-01-22 07:56:44"]]
|
315
|
+
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
316
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
317
|
+
[1m[36mOrbDef::WeatherStation Load (0.3ms)[0m [1m[34mSELECT "orb_def_weather_stations".* FROM "orb_def_weather_stations" WHERE "orb_def_weather_stations"."id" = $1 LIMIT $2[0m [["id", 2], ["LIMIT", 1]]
|
318
|
+
[1m[36mOrbDef::Fire Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "orb_def_fires" WHERE "orb_def_fires"."identifier" = $1 LIMIT $2[0m [["identifier", "78bc15a58abecf19b2bece870707ee773cefa7f5953d04251575b96ecd8b277b"], ["LIMIT", 1]]
|
319
|
+
[1m[36mOrbDef::Fire Create (0.6ms)[0m [1m[32mINSERT INTO "orb_def_fires" ("weather_station_id", "detection_type_id", "latitude", "longitude", "brightness", "bright_t31", "scan", "track", "frp", "scan_type", "identifier", "lat_long", "satellite", "confidence", "version", "detected_at_weather_reading_id", "detected_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19) RETURNING "id"[0m [["weather_station_id", 2], ["detection_type_id", 1], ["latitude", -18.866], ["longitude", 139.325], ["brightness", 335.1], ["bright_t31", 292.8], ["scan", 1.2], ["track", 1.1], ["frp", 33.8], ["scan_type", "modis"], ["identifier", "78bc15a58abecf19b2bece870707ee773cefa7f5953d04251575b96ecd8b277b"], ["lat_long", "-18.866,139.325"], ["satellite", "T"], ["confidence", "78"], ["version", "6.0NRT"], ["detected_at_weather_reading_id", 2], ["detected_at", "2020-01-22 01:10:00"], ["created_at", "2020-01-22 07:56:44"], ["updated_at", "2020-01-22 07:56:44"]]
|
320
|
+
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
321
|
+
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
322
|
+
[1m[36mOrbDef::Fire Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "orb_def_fires" WHERE "orb_def_fires"."identifier" = $1 AND "orb_def_fires"."id" != $2 LIMIT $3[0m [["identifier", "78bc15a58abecf19b2bece870707ee773cefa7f5953d04251575b96ecd8b277b"], ["id", 3], ["LIMIT", 1]]
|
323
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
324
|
+
Nasa::FirmsClient#fetch - Started
|
325
|
+
Nasa::FirmsClient#fetch - Failed: 404 Not Found - /api/v2/content/archives/FIRMS/viirs/Global/VIIRS_I_Global_VNP14IMGTDL_NRT_2020022
|
326
|
+
Nasa::FirmsImport#all - Failed to fetch virrs
|
327
|
+
[1m[35m (0.5ms)[0m [1m[34mSELECT COUNT(*) FROM "orb_def_fires"[0m
|
328
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
329
|
+
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
330
|
+
[1m[35m (0.4ms)[0m [1m[31mROLLBACK[0m
|
@@ -0,0 +1 @@
|
|
1
|
+
9ffc85a91167ce4ceeb82ec443621b1c849f06cefc9cff0d90e6ad8399848ca9f5e8fe32acca76f24059de733960c6eda397b1b0591dd6ff2e25a3ad7a1515d8
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: orb_def
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Gascoigne-Taylor
|
@@ -320,6 +320,8 @@ files:
|
|
320
320
|
- spec/dummy/config/spring.rb
|
321
321
|
- spec/dummy/config/storage.yml
|
322
322
|
- spec/dummy/db/schema.rb
|
323
|
+
- spec/dummy/log/development.log
|
324
|
+
- spec/dummy/log/test.log
|
323
325
|
- spec/dummy/package.json
|
324
326
|
- spec/dummy/public/404.html
|
325
327
|
- spec/dummy/public/422.html
|
@@ -327,6 +329,7 @@ files:
|
|
327
329
|
- spec/dummy/public/apple-touch-icon-precomposed.png
|
328
330
|
- spec/dummy/public/apple-touch-icon.png
|
329
331
|
- spec/dummy/public/favicon.ico
|
332
|
+
- spec/dummy/tmp/development_secret.txt
|
330
333
|
- spec/factories/detection_type.rb
|
331
334
|
- spec/fixtures/files/modis_c6.txt
|
332
335
|
- spec/fixtures/nasa/firms/viirs.txt
|
@@ -421,6 +424,9 @@ test_files:
|
|
421
424
|
- spec/dummy/public/apple-touch-icon-precomposed.png
|
422
425
|
- spec/dummy/package.json
|
423
426
|
- spec/dummy/db/schema.rb
|
427
|
+
- spec/dummy/log/test.log
|
428
|
+
- spec/dummy/log/development.log
|
429
|
+
- spec/dummy/tmp/development_secret.txt
|
424
430
|
- spec/spec/vcr/cassettes/OrbitalDefenceEngine_OpenWeatherApi_WeatherByCoordinates/_fetch_weather_by_coordinates/returns_json_data_as_a_hash.yml
|
425
431
|
- spec/spec/vcr/cassettes/OrbitalDefenceEngine_Nasa_FirmsImport/_all/when_request_successful/creates_fires.yml
|
426
432
|
- spec/vcr/cassettes/OpenWeatherApi_WeatherByCoordinates/_fetch_weather_by_coordinates/returns_json_data_as_a_hash.yml
|