asyncapi-server 1.1.3 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +1 -1
- data/app/assets/config/manifest.js +3 -0
- data/app/controllers/asyncapi/server/v1/jobs_controller.rb +3 -1
- data/app/controllers/concerns/active_model_serializers_fix.rb +10 -0
- data/app/serializers/asyncapi/server/job_serializer.rb +1 -1
- data/app/workers/asyncapi/server/job_status_notifier_worker.rb +53 -0
- data/app/workers/asyncapi/server/job_worker.rb +2 -16
- data/db/migrate/20141112034324_create_asyncapi_server_jobs.rb +1 -1
- data/db/migrate/20141212064931_add_secret_to_asyncapi_server_job.rb +1 -1
- data/db/migrate/20150130062520_add_expired_at_to_asyncapi_server_job.rb +1 -1
- data/db/migrate/20150201231018_drop_expired_at_from_asyncapi_server_jobs.rb +1 -1
- data/lib/asyncapi/server/rails_ext/controller.rb +1 -1
- data/lib/asyncapi/server/rspec.rb +20 -7
- data/lib/asyncapi/server/version.rb +1 -1
- data/spec/controllers/asyncapi/server/v1/jobs_controller_spec.rb +4 -4
- data/spec/dummy/app/assets/config/manifest.js +3 -0
- data/spec/dummy/app/controllers/tests_controller.rb +1 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/schema.rb +10 -11
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +75 -39
- data/spec/dummy/log/test.log +709 -3771
- data/spec/models/job_spec.rb +1 -1
- data/spec/requests/enqueueing_jobs_spec.rb +6 -4
- data/spec/serializers/job_serializer_spec.rb +1 -0
- data/spec/spec_helper.rb +0 -1
- data/spec/workers/job_status_notifier_worker_spec.rb +119 -0
- data/spec/workers/job_worker_spec.rb +2 -29
- metadata +69 -63
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 90b537a8a3a04c315e5ed15d9e4e2c002279834c99329bfccc0d6c43e2746fb4
|
4
|
+
data.tar.gz: 81c7bb59a652e5ac439907b916c13ac0bf1782831d020835bcb130354404e8f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9991544c6ecf94cf62741bc1830d8282db8fc9a7301137bac4c1e77514b431c595b8799648501da595293ed0f9c2144902986366884c4337b816d186ee94810
|
7
|
+
data.tar.gz: 072d3710fa2243542cafc7623611abc2ce6fbc29c3f45cd48942151f52f3b1c395fd8dbc92276fa7ec72ce66f14f5d0f0b702df83254b3e1eac078997517a8a4
|
data/README.md
CHANGED
@@ -96,7 +96,7 @@ require "asyncapi/server/rspec"
|
|
96
96
|
When you make a request, instead of `post`, use `asyncapi_post`. Ex:
|
97
97
|
|
98
98
|
```ruby
|
99
|
-
asyncapi_post("/api/v1/long_running_job", name: "Compute")
|
99
|
+
asyncapi_post("/api/v1/long_running_job", params: { name: "Compute" })
|
100
100
|
```
|
101
101
|
|
102
102
|
This helper calls `post` underneath but builds the request in a way that Asyncapi server understands.
|
@@ -2,6 +2,8 @@ module Asyncapi
|
|
2
2
|
module Server
|
3
3
|
module V1
|
4
4
|
class JobsController < ApplicationController # TODO: Asyncapi::Server.parent_controller
|
5
|
+
include ActiveModelSerializersFix
|
6
|
+
include Rails::Pagination
|
5
7
|
|
6
8
|
protect_from_forgery with: :null_session
|
7
9
|
respond_to :json
|
@@ -24,7 +26,7 @@ module Asyncapi
|
|
24
26
|
job.destroy
|
25
27
|
respond_with job
|
26
28
|
else
|
27
|
-
|
29
|
+
head :not_found
|
28
30
|
end
|
29
31
|
end
|
30
32
|
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module ActiveModelSerializersFix
|
2
|
+
def namespace_for_serializer
|
3
|
+
@namespace_for_serializer ||=
|
4
|
+
if Module.method_defined?(:parent)
|
5
|
+
self.class.parent unless self.class.parent == Object
|
6
|
+
else
|
7
|
+
self.class.module_parent unless self.class.module_parent == Object
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
module Asyncapi::Server
|
2
|
+
class JobStatusNotifierWorker
|
3
|
+
|
4
|
+
include Sidekiq::Worker
|
5
|
+
sidekiq_options retry: false
|
6
|
+
MAX_RETRIES = 2
|
7
|
+
|
8
|
+
def perform(job_id, job_message, retries=0)
|
9
|
+
@job = Job.find(job_id)
|
10
|
+
|
11
|
+
report_job_status(job_message)
|
12
|
+
|
13
|
+
unless @response.code == 200
|
14
|
+
if retries <= MAX_RETRIES
|
15
|
+
@jid = JobStatusNotifierWorker.perform_async(job_id, job_message, retries+1)
|
16
|
+
else
|
17
|
+
raise format_error("Something went wrong while poking #{@job.callback_url}")
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
def report_job_status(job_message)
|
25
|
+
@response ||= Typhoeus.put(
|
26
|
+
@job.callback_url,
|
27
|
+
timeout: 60,
|
28
|
+
connecttimeout: 60,
|
29
|
+
body: {
|
30
|
+
job: {
|
31
|
+
status: @job.status,
|
32
|
+
message: @job_message,
|
33
|
+
secret: @job.secret,
|
34
|
+
}
|
35
|
+
}.to_json,
|
36
|
+
headers: {
|
37
|
+
"Content-Type" => "application/json",
|
38
|
+
Accept: "application/json"
|
39
|
+
}
|
40
|
+
)
|
41
|
+
end
|
42
|
+
|
43
|
+
def format_error(error)
|
44
|
+
[
|
45
|
+
error,
|
46
|
+
"JobID: #{@job.id}",
|
47
|
+
"Next Attempt: #{@jid}",
|
48
|
+
"HTTP Status: #{@response.code}",
|
49
|
+
"HTTP Response: #{@response.inspect}",
|
50
|
+
].join("\n")
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -17,7 +17,7 @@ module Asyncapi::Server
|
|
17
17
|
raise e
|
18
18
|
ensure
|
19
19
|
if job
|
20
|
-
job.
|
20
|
+
job.update(status: job_status)
|
21
21
|
report_job_status(job, job_message)
|
22
22
|
else
|
23
23
|
# For some reason "ActiveRecord::Base.after_transaction",
|
@@ -34,21 +34,7 @@ module Asyncapi::Server
|
|
34
34
|
private
|
35
35
|
|
36
36
|
def report_job_status(job, job_message)
|
37
|
-
|
38
|
-
job.callback_url,
|
39
|
-
body: {
|
40
|
-
job: {
|
41
|
-
status: job.status,
|
42
|
-
message: job_message,
|
43
|
-
secret: job.secret,
|
44
|
-
}
|
45
|
-
}.to_json,
|
46
|
-
headers: {
|
47
|
-
"Content-Type" => "application/json",
|
48
|
-
Accept: "application/json"
|
49
|
-
}
|
50
|
-
)
|
37
|
+
JobStatusNotifierWorker.perform_async(job.id, job_message)
|
51
38
|
end
|
52
|
-
|
53
39
|
end
|
54
40
|
end
|
@@ -3,15 +3,28 @@ module Asyncapi
|
|
3
3
|
module RSpec
|
4
4
|
|
5
5
|
def asyncapi_post(url, params)
|
6
|
-
|
7
|
-
|
8
|
-
callback_url: "callback_url",
|
9
|
-
params: params,
|
10
|
-
secret: "sekret",
|
11
|
-
}
|
12
|
-
})
|
6
|
+
formatted_params = format_params(params)
|
7
|
+
post(url, formatted_params)
|
13
8
|
end
|
14
9
|
|
10
|
+
private
|
11
|
+
|
12
|
+
def format_params(params)
|
13
|
+
if params.is_a?(Hash) && params.has_key?(:params)
|
14
|
+
params = params[:params]
|
15
|
+
return { params: base_params(params) }
|
16
|
+
else
|
17
|
+
return base_params(params)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def base_params(params)
|
22
|
+
return { job: {
|
23
|
+
callback_url: "callback_url",
|
24
|
+
params: params,
|
25
|
+
secret: "sekret",
|
26
|
+
}}
|
27
|
+
end
|
15
28
|
end
|
16
29
|
end
|
17
30
|
end
|
@@ -10,7 +10,7 @@ module Asyncapi
|
|
10
10
|
it "returns all jobs" do
|
11
11
|
job_1 = create(:asyncapi_server_job)
|
12
12
|
job_2 = create(:asyncapi_server_job)
|
13
|
-
get :index, format: :json, page: 2, per_page: 1
|
13
|
+
get :index, format: :json, params: { page: 2, per_page: 1 }
|
14
14
|
expect(response).to be_successful
|
15
15
|
parsed_result = indifferent_hash(response.body)
|
16
16
|
expect(parsed_result.first[:id]).to eq job_2.id
|
@@ -21,7 +21,7 @@ module Asyncapi
|
|
21
21
|
describe "GET show" do
|
22
22
|
it "returns the job with the given id" do
|
23
23
|
job = create(:asyncapi_server_job)
|
24
|
-
get :show, format: :json, id: job.id
|
24
|
+
get :show, format: :json, params: { id: job.id }
|
25
25
|
expect(response).to be_successful
|
26
26
|
parsed_result = indifferent_hash(response.body)[:job]
|
27
27
|
expect(parsed_result[:id]).to eq job.id
|
@@ -32,14 +32,14 @@ module Asyncapi
|
|
32
32
|
describe "DELETE destroy" do
|
33
33
|
it "finds the job by id and secret and deletes it" do
|
34
34
|
job = create(:asyncapi_server_job, secret: "12312")
|
35
|
-
delete :destroy, format: :json, id: job.id, secret: "12312"
|
35
|
+
delete :destroy, format: :json, params: { id: job.id, secret: "12312" }
|
36
36
|
expect(response).to be_successful
|
37
37
|
end
|
38
38
|
|
39
39
|
context "secret does not match" do
|
40
40
|
it "does not delete the job" do
|
41
41
|
job = create(:asyncapi_server_job, secret: "12312")
|
42
|
-
delete :destroy, format: :json, id: job.id, secret: "12315"
|
42
|
+
delete :destroy, format: :json, params: { id: job.id, secret: "12315" }
|
43
43
|
expect(response.status).to eq 404
|
44
44
|
end
|
45
45
|
end
|
Binary file
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -1,24 +1,23 @@
|
|
1
|
-
# encoding: UTF-8
|
2
1
|
# This file is auto-generated from the current state of the database. Instead
|
3
2
|
# of editing this file, please use the migrations feature of Active Record to
|
4
3
|
# incrementally modify your database, and then regenerate this schema definition.
|
5
4
|
#
|
6
|
-
#
|
7
|
-
#
|
8
|
-
#
|
9
|
-
# from scratch.
|
10
|
-
#
|
5
|
+
# This file is the source Rails uses to define your schema when running `bin/rails
|
6
|
+
# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
|
7
|
+
# be faster and is potentially less error prone than running all of your
|
8
|
+
# migrations from scratch. Old migrations may fail to apply correctly if those
|
9
|
+
# migrations use external dependencies or application code.
|
11
10
|
#
|
12
11
|
# It's strongly recommended that you check this file into your version control system.
|
13
12
|
|
14
|
-
ActiveRecord::Schema.define(version:
|
13
|
+
ActiveRecord::Schema.define(version: 2015_02_01_231018) do
|
15
14
|
|
16
15
|
create_table "asyncapi_server_jobs", force: :cascade do |t|
|
17
16
|
t.integer "status"
|
18
|
-
t.string
|
19
|
-
t.string
|
20
|
-
t.text
|
21
|
-
t.string
|
17
|
+
t.string "callback_url"
|
18
|
+
t.string "class_name"
|
19
|
+
t.text "params"
|
20
|
+
t.string "secret"
|
22
21
|
end
|
23
22
|
|
24
23
|
end
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
@@ -1,43 +1,79 @@
|
|
1
|
-
[1m[
|
2
|
-
[1m[35m (0.
|
3
|
-
[1m[
|
4
|
-
[1m[
|
1
|
+
[1m[35m (0.4ms)[0m [1m[34mSELECT sqlite_version(*)[0m
|
2
|
+
[1m[35m (0.0ms)[0m [1m[34mSELECT sqlite_version(*)[0m
|
3
|
+
[1m[35m (0.4ms)[0m [1m[34mSELECT sqlite_version(*)[0m
|
4
|
+
[1m[35m (0.9ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)[0m
|
5
|
+
[1m[35m (0.5ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)[0m
|
6
|
+
[1m[35m (0.0ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
5
7
|
Migrating to CreateAsyncapiServerJobs (20141112034324)
|
6
|
-
[1m[
|
7
|
-
[1m[35m (
|
8
|
-
[1m[
|
9
|
-
[1m[
|
8
|
+
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
|
9
|
+
[1m[35m (0.2ms)[0m [1m[35mCREATE TABLE "asyncapi_server_jobs" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "status" integer, "callback_url" varchar, "class_name" varchar, "params" text)[0m
|
10
|
+
[1m[36mActiveRecord::SchemaMigration Create (0.0ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20141112034324"]]
|
11
|
+
[1m[36mTRANSACTION (0.3ms)[0m [1m[36mcommit transaction[0m
|
10
12
|
Migrating to AddSecretToAsyncapiServerJob (20141212064931)
|
11
|
-
[1m[
|
12
|
-
[1m[35m (
|
13
|
-
[1m[
|
14
|
-
[1m[
|
13
|
+
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
|
14
|
+
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "asyncapi_server_jobs" ADD "secret" varchar[0m
|
15
|
+
[1m[36mActiveRecord::SchemaMigration Create (0.0ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20141212064931"]]
|
16
|
+
[1m[36mTRANSACTION (0.2ms)[0m [1m[36mcommit transaction[0m
|
15
17
|
Migrating to AddExpiredAtToAsyncapiServerJob (20150130062520)
|
16
|
-
[1m[
|
17
|
-
[1m[35m (
|
18
|
-
[1m[
|
19
|
-
[1m[
|
20
|
-
[1m[
|
18
|
+
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
|
19
|
+
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "asyncapi_server_jobs" ADD "expired_at" datetime[0m
|
20
|
+
[1m[36mAsyncapi::Server::Job Update All (0.0ms)[0m [1m[33mUPDATE "asyncapi_server_jobs" SET "expired_at" = ? WHERE "asyncapi_server_jobs"."expired_at" IS NULL[0m [["expired_at", "2022-03-31 17:20:18.167919"]]
|
21
|
+
[1m[36mActiveRecord::SchemaMigration Create (0.0ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20150130062520"]]
|
22
|
+
[1m[36mTRANSACTION (0.2ms)[0m [1m[36mcommit transaction[0m
|
21
23
|
Migrating to DropExpiredAtFromAsyncapiServerJobs (20150201231018)
|
22
|
-
[1m[
|
23
|
-
[1m[
|
24
|
-
[1m[35m (0.
|
25
|
-
[1m[
|
26
|
-
[1m[35m (0.
|
27
|
-
[1m[
|
28
|
-
[1m[35m (0.
|
29
|
-
|
30
|
-
[1m[35m (
|
31
|
-
[1m[
|
32
|
-
[1m[
|
33
|
-
|
34
|
-
[1m[
|
35
|
-
[1m[
|
36
|
-
[1m[
|
37
|
-
[1m[36mActiveRecord::SchemaMigration
|
38
|
-
|
39
|
-
[1m[
|
40
|
-
[1m[
|
41
|
-
[1m[
|
42
|
-
[1m[
|
43
|
-
[1m[
|
24
|
+
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
|
25
|
+
[1m[35m (0.0ms)[0m [1m[35mPRAGMA foreign_keys[0m
|
26
|
+
[1m[35m (0.0ms)[0m [1m[35mPRAGMA defer_foreign_keys[0m
|
27
|
+
[1m[35m (0.0ms)[0m [1m[35mPRAGMA defer_foreign_keys = ON[0m
|
28
|
+
[1m[35m (0.0ms)[0m [1m[35mPRAGMA foreign_keys = OFF[0m
|
29
|
+
[1m[35m (0.0ms)[0m [1m[35mCREATE TEMPORARY TABLE "aasyncapi_server_jobs" ("id" integer NOT NULL PRIMARY KEY, "status" integer DEFAULT NULL, "callback_url" varchar DEFAULT NULL, "class_name" varchar DEFAULT NULL, "params" text DEFAULT NULL, "secret" varchar DEFAULT NULL, "expired_at" datetime DEFAULT NULL)[0m
|
30
|
+
[1m[35m (0.0ms)[0m [1m[32mINSERT INTO "aasyncapi_server_jobs" ("id","status","callback_url","class_name","params","secret","expired_at")
|
31
|
+
SELECT "id","status","callback_url","class_name","params","secret","expired_at" FROM "asyncapi_server_jobs"[0m
|
32
|
+
[1m[35m (0.1ms)[0m [1m[35mDROP TABLE "asyncapi_server_jobs"[0m
|
33
|
+
[1m[35m (0.0ms)[0m [1m[35mCREATE TABLE "asyncapi_server_jobs" ("id" integer NOT NULL PRIMARY KEY, "status" integer DEFAULT NULL, "callback_url" varchar DEFAULT NULL, "class_name" varchar DEFAULT NULL, "params" text DEFAULT NULL, "secret" varchar DEFAULT NULL)[0m
|
34
|
+
[1m[35m (0.0ms)[0m [1m[32mINSERT INTO "asyncapi_server_jobs" ("id","status","callback_url","class_name","params","secret")
|
35
|
+
SELECT "id","status","callback_url","class_name","params","secret" FROM "aasyncapi_server_jobs"[0m
|
36
|
+
[1m[35m (0.0ms)[0m [1m[35mDROP TABLE "aasyncapi_server_jobs"[0m
|
37
|
+
[1m[35m (0.0ms)[0m [1m[35mPRAGMA defer_foreign_keys = 0[0m
|
38
|
+
[1m[35m (0.0ms)[0m [1m[35mPRAGMA foreign_keys = 1[0m
|
39
|
+
[1m[36mActiveRecord::SchemaMigration Create (0.0ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20150201231018"]]
|
40
|
+
[1m[36mTRANSACTION (0.2ms)[0m [1m[36mcommit transaction[0m
|
41
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.0ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
|
42
|
+
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
|
43
|
+
[1m[36mActiveRecord::InternalMetadata Create (0.1ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["key", "environment"], ["value", "development"], ["created_at", "2022-03-21 17:20:18.173359"], ["updated_at", "2022-03-21 17:20:18.173359"]]
|
44
|
+
[1m[36mTRANSACTION (0.2ms)[0m [1m[36mcommit transaction[0m
|
45
|
+
[1m[35m (0.0ms)[0m [1m[34mSELECT sqlite_version(*)[0m
|
46
|
+
[1m[35m (0.0ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
47
|
+
[1m[35m (0.4ms)[0m [1m[34mSELECT sqlite_version(*)[0m
|
48
|
+
[1m[35m (0.0ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
49
|
+
[1m[35m (0.0ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ?[0m [["key", "environment"]]
|
50
|
+
[1m[35m (0.0ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
51
|
+
[1m[35m (0.0ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ?[0m [["key", "environment"]]
|
52
|
+
[1m[35m (0.0ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
53
|
+
[1m[35m (0.0ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ?[0m [["key", "environment"]]
|
54
|
+
[1m[35m (0.0ms)[0m [1m[34mSELECT sqlite_version(*)[0m
|
55
|
+
[1m[35m (0.0ms)[0m [1m[34mSELECT sqlite_version(*)[0m
|
56
|
+
[1m[35m (0.0ms)[0m [1m[35mDROP TABLE IF EXISTS "asyncapi_server_jobs"[0m
|
57
|
+
[1m[35m (0.4ms)[0m [1m[35mCREATE TABLE "asyncapi_server_jobs" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "status" integer, "callback_url" varchar, "class_name" varchar, "params" text, "secret" varchar)[0m
|
58
|
+
[1m[35m (0.3ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)[0m
|
59
|
+
[1m[35m (0.0ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
60
|
+
[1m[35m (0.3ms)[0m [1m[32mINSERT INTO "schema_migrations" (version) VALUES (20150201231018)[0m
|
61
|
+
[1m[35m (0.3ms)[0m [1m[32mINSERT INTO "schema_migrations" (version) VALUES
|
62
|
+
(20141112034324),
|
63
|
+
(20141212064931),
|
64
|
+
(20150130062520);
|
65
|
+
|
66
|
+
[0m
|
67
|
+
[1m[35m (0.3ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)[0m
|
68
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.0ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
|
69
|
+
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
|
70
|
+
[1m[36mActiveRecord::InternalMetadata Create (0.1ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["key", "environment"], ["value", "development"], ["created_at", "2022-03-21 17:20:22.487005"], ["updated_at", "2022-03-21 17:20:22.487005"]]
|
71
|
+
[1m[36mTRANSACTION (0.2ms)[0m [1m[36mcommit transaction[0m
|
72
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.0ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
|
73
|
+
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
|
74
|
+
[1m[36mActiveRecord::InternalMetadata Update (0.1ms)[0m [1m[33mUPDATE "ar_internal_metadata" SET "value" = ?, "updated_at" = ? WHERE "ar_internal_metadata"."key" = ?[0m [["value", "test"], ["updated_at", "2022-03-21 17:20:22.488003"], ["key", "environment"]]
|
75
|
+
[1m[36mTRANSACTION (0.2ms)[0m [1m[36mcommit transaction[0m
|
76
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.0ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "schema_sha1"], ["LIMIT", 1]]
|
77
|
+
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
|
78
|
+
[1m[36mActiveRecord::InternalMetadata Create (0.1ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["key", "schema_sha1"], ["value", "b156e6c6d273062fcb56e7a3782b664b02612fc5"], ["created_at", "2022-03-21 17:20:22.488753"], ["updated_at", "2022-03-21 17:20:22.488753"]]
|
79
|
+
[1m[36mTRANSACTION (0.2ms)[0m [1m[36mcommit transaction[0m
|