asyncapi-server 1.1.3 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +1 -1
  3. data/app/assets/config/manifest.js +3 -0
  4. data/app/controllers/asyncapi/server/v1/jobs_controller.rb +3 -1
  5. data/app/controllers/concerns/active_model_serializers_fix.rb +10 -0
  6. data/app/serializers/asyncapi/server/job_serializer.rb +1 -1
  7. data/app/workers/asyncapi/server/job_status_notifier_worker.rb +53 -0
  8. data/app/workers/asyncapi/server/job_worker.rb +2 -16
  9. data/db/migrate/20141112034324_create_asyncapi_server_jobs.rb +1 -1
  10. data/db/migrate/20141212064931_add_secret_to_asyncapi_server_job.rb +1 -1
  11. data/db/migrate/20150130062520_add_expired_at_to_asyncapi_server_job.rb +1 -1
  12. data/db/migrate/20150201231018_drop_expired_at_from_asyncapi_server_jobs.rb +1 -1
  13. data/lib/asyncapi/server/rails_ext/controller.rb +1 -1
  14. data/lib/asyncapi/server/rspec.rb +20 -7
  15. data/lib/asyncapi/server/version.rb +1 -1
  16. data/spec/controllers/asyncapi/server/v1/jobs_controller_spec.rb +4 -4
  17. data/spec/dummy/app/assets/config/manifest.js +3 -0
  18. data/spec/dummy/app/controllers/tests_controller.rb +1 -0
  19. data/spec/dummy/db/development.sqlite3 +0 -0
  20. data/spec/dummy/db/schema.rb +10 -11
  21. data/spec/dummy/db/test.sqlite3 +0 -0
  22. data/spec/dummy/log/development.log +75 -39
  23. data/spec/dummy/log/test.log +709 -3771
  24. data/spec/models/job_spec.rb +1 -1
  25. data/spec/requests/enqueueing_jobs_spec.rb +6 -4
  26. data/spec/serializers/job_serializer_spec.rb +1 -0
  27. data/spec/spec_helper.rb +0 -1
  28. data/spec/workers/job_status_notifier_worker_spec.rb +119 -0
  29. data/spec/workers/job_worker_spec.rb +2 -29
  30. metadata +69 -63
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 6474a23ea2a71357536415e3f47a521631f7dfd6
4
- data.tar.gz: f2dd84f467e36bb75be0e1d050ee1ce89c813c5f
2
+ SHA256:
3
+ metadata.gz: 90b537a8a3a04c315e5ed15d9e4e2c002279834c99329bfccc0d6c43e2746fb4
4
+ data.tar.gz: 81c7bb59a652e5ac439907b916c13ac0bf1782831d020835bcb130354404e8f1
5
5
  SHA512:
6
- metadata.gz: a96efc749932659c6f8e192b083a2c6bbe14b97de47bfe08ec2eb59512a8f3a4776267ebe659a4672c4c3411d50256142f391f1b4500a0b9e0aca10283393480
7
- data.tar.gz: 1fa06b7a02572ad9722a7f7212bb9c3743dc1a5a88c8a3dcdcedc8b18a3091ee103ddde8ca5d42c72b4c482da06edc22d9c5cb867788dfbf773457190046eed2
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.
@@ -0,0 +1,3 @@
1
+ //= link_tree ../images
2
+ //= link_directory ../javascripts .js
3
+ //= link_directory ../stylesheets .css
@@ -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
- render nothing: true, status: 404
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
@@ -2,7 +2,7 @@ module Asyncapi
2
2
  module Server
3
3
  class JobSerializer < ActiveModel::Serializer
4
4
 
5
- attributes :id, :url, :secret
5
+ attributes :id, :status, :url, :secret
6
6
 
7
7
  end
8
8
  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.update_attributes(status: job_status)
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
- Typhoeus.put(
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
@@ -1,4 +1,4 @@
1
- class CreateAsyncapiServerJobs < ActiveRecord::Migration
1
+ class CreateAsyncapiServerJobs < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :asyncapi_server_jobs do |t|
4
4
  t.integer :status
@@ -1,4 +1,4 @@
1
- class AddSecretToAsyncapiServerJob < ActiveRecord::Migration
1
+ class AddSecretToAsyncapiServerJob < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_column :asyncapi_server_jobs, :secret, :string
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddExpiredAtToAsyncapiServerJob < ActiveRecord::Migration
1
+ class AddExpiredAtToAsyncapiServerJob < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_column :asyncapi_server_jobs, :expired_at, :datetime
4
4
 
@@ -1,4 +1,4 @@
1
- class DropExpiredAtFromAsyncapiServerJobs < ActiveRecord::Migration
1
+ class DropExpiredAtFromAsyncapiServerJobs < ActiveRecord::Migration[4.2]
2
2
  def up
3
3
  remove_column :asyncapi_server_jobs, :expired_at
4
4
  end
@@ -2,10 +2,10 @@ module Asyncapi
2
2
  module Server
3
3
  module RailsExt
4
4
  module Controller
5
-
6
5
  extend ActiveSupport::Concern
7
6
 
8
7
  module ClassMethods
8
+
9
9
  def async(method_name, klass)
10
10
  define_method(method_name) do
11
11
  job = Job.create(job_params_with(klass.name))
@@ -3,15 +3,28 @@ module Asyncapi
3
3
  module RSpec
4
4
 
5
5
  def asyncapi_post(url, params)
6
- post(url, {
7
- job: {
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
@@ -1,5 +1,5 @@
1
1
  module Asyncapi
2
2
  module Server
3
- VERSION = "1.1.3"
3
+ VERSION = "1.3.2"
4
4
  end
5
5
  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
@@ -0,0 +1,3 @@
1
+ //= link_tree ../images
2
+ //= link_directory ../javascripts .js
3
+ //= link_directory ../stylesheets .css
@@ -1,4 +1,5 @@
1
1
  class TestsController < ApplicationController
2
+ include ActiveModelSerializersFix
2
3
 
3
4
  async :create, Runner
4
5
 
Binary file
@@ -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
- # Note that this schema.rb definition is the authoritative source for your
7
- # database schema. If you need to create the application database on another
8
- # system, you should be using db:schema:load, not running all the migrations
9
- # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
- # you'll amass, the slower it'll run and the greater likelihood for issues).
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: 20150201231018) do
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 "callback_url"
19
- t.string "class_name"
20
- t.text "params"
21
- t.string "secret"
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
Binary file
@@ -1,43 +1,79 @@
1
-  (4.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
2
-  (0.1ms) select sqlite_version(*)
3
-  (4.5ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
4
- ActiveRecord::SchemaMigration Load (0.9ms) SELECT "schema_migrations".* FROM "schema_migrations"
1
+  (0.4ms) SELECT sqlite_version(*)
2
+  (0.0ms) SELECT sqlite_version(*)
3
+  (0.4ms) SELECT sqlite_version(*)
4
+  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
5
+  (0.5ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)
6
+  (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
5
7
  Migrating to CreateAsyncapiServerJobs (20141112034324)
6
-  (0.1ms) begin transaction
7
-  (2.9ms) CREATE TABLE "asyncapi_server_jobs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "status" integer, "callback_url" varchar, "class_name" varchar, "params" text)
8
- SQL (0.7ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141112034324"]]
9
-  (2.5ms) commit transaction
8
+ TRANSACTION (0.0ms) begin transaction
9
+  (0.2ms) CREATE TABLE "asyncapi_server_jobs" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "status" integer, "callback_url" varchar, "class_name" varchar, "params" text)
10
+ ActiveRecord::SchemaMigration Create (0.0ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141112034324"]]
11
+ TRANSACTION (0.3ms) commit transaction
10
12
  Migrating to AddSecretToAsyncapiServerJob (20141212064931)
11
-  (0.1ms) begin transaction
12
-  (4.3ms) ALTER TABLE "asyncapi_server_jobs" ADD "secret" varchar
13
- SQL (1.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141212064931"]]
14
-  (4.2ms) commit transaction
13
+ TRANSACTION (0.0ms) begin transaction
14
+  (0.2ms) ALTER TABLE "asyncapi_server_jobs" ADD "secret" varchar
15
+ ActiveRecord::SchemaMigration Create (0.0ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141212064931"]]
16
+ TRANSACTION (0.2ms) commit transaction
15
17
  Migrating to AddExpiredAtToAsyncapiServerJob (20150130062520)
16
-  (0.1ms) begin transaction
17
-  (6.0ms) ALTER TABLE "asyncapi_server_jobs" ADD "expired_at" datetime
18
- SQL (0.0ms) UPDATE "asyncapi_server_jobs" SET "expired_at" = '2016-07-31 00:11:55.202627' WHERE "asyncapi_server_jobs"."expired_at" IS NULL
19
- SQL (0.9ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150130062520"]]
20
-  (2.3ms) commit transaction
18
+ TRANSACTION (0.0ms) begin transaction
19
+  (0.2ms) ALTER TABLE "asyncapi_server_jobs" ADD "expired_at" datetime
20
+ Asyncapi::Server::Job Update All (0.0ms) UPDATE "asyncapi_server_jobs" SET "expired_at" = ? WHERE "asyncapi_server_jobs"."expired_at" IS NULL [["expired_at", "2022-03-31 17:20:18.167919"]]
21
+ ActiveRecord::SchemaMigration Create (0.0ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150130062520"]]
22
+ TRANSACTION (0.2ms) commit transaction
21
23
  Migrating to DropExpiredAtFromAsyncapiServerJobs (20150201231018)
22
-  (0.1ms) begin transaction
23
-  (2.2ms) CREATE TEMPORARY TABLE "aasyncapi_server_jobs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "status" integer, "callback_url" varchar, "class_name" varchar, "params" text, "secret" varchar, "expired_at" datetime) 
24
-  (0.5ms) SELECT * FROM "asyncapi_server_jobs"
25
-  (3.0ms) DROP TABLE "asyncapi_server_jobs"
26
-  (0.2ms) CREATE TABLE "asyncapi_server_jobs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "status" integer, "callback_url" varchar, "class_name" varchar, "params" text, "secret" varchar)
27
-  (0.1ms) SELECT * FROM "aasyncapi_server_jobs"
28
-  (0.4ms) DROP TABLE "aasyncapi_server_jobs"
29
- SQL (1.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150201231018"]]
30
-  (4.5ms) commit transaction
31
- ActiveRecord::SchemaMigration Load (1.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
32
- ActiveRecord::SchemaMigration Load (1.0ms) SELECT "schema_migrations".* FROM "schema_migrations"
33
- ActiveRecord::SchemaMigration Load (0.9ms) SELECT "schema_migrations".* FROM "schema_migrations"
34
- ActiveRecord::SchemaMigration Load (2.0ms) SELECT "schema_migrations".* FROM "schema_migrations"
35
- ActiveRecord::SchemaMigration Load (1.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
36
- Asyncapi::Server::Job Load (27.5ms) SELECT "asyncapi_server_jobs".* FROM "asyncapi_server_jobs"
37
- ActiveRecord::SchemaMigration Load (1.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
38
- Migrating to AddExpiredAtToAsyncapiServerJobs (20160721002627)
39
-  (0.1ms) begin transaction
40
-  (3.7ms) ALTER TABLE "asyncapi_server_jobs" ADD "expired_at" datetime
41
- SQL (0.8ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20160721002627"]]
42
-  (2.0ms) commit transaction
43
- ActiveRecord::SchemaMigration Load (1.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
24
+ TRANSACTION (0.0ms) begin transaction
25
+  (0.0ms) PRAGMA foreign_keys
26
+  (0.0ms) PRAGMA defer_foreign_keys
27
+  (0.0ms) PRAGMA defer_foreign_keys = ON
28
+  (0.0ms) PRAGMA foreign_keys = OFF
29
+  (0.0ms) CREATE 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)
30
+  (0.0ms) INSERT 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"
32
+  (0.1ms) DROP TABLE "asyncapi_server_jobs"
33
+  (0.0ms) CREATE 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)
34
+  (0.0ms) INSERT 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"
36
+  (0.0ms) DROP TABLE "aasyncapi_server_jobs"
37
+  (0.0ms) PRAGMA defer_foreign_keys = 0
38
+  (0.0ms) PRAGMA foreign_keys = 1
39
+ ActiveRecord::SchemaMigration Create (0.0ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150201231018"]]
40
+ TRANSACTION (0.2ms) commit transaction
41
+ ActiveRecord::InternalMetadata Load (0.0ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
42
+ TRANSACTION (0.0ms) begin transaction
43
+ ActiveRecord::InternalMetadata Create (0.1ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "development"], ["created_at", "2022-03-21 17:20:18.173359"], ["updated_at", "2022-03-21 17:20:18.173359"]]
44
+ TRANSACTION (0.2ms) commit transaction
45
+  (0.0ms) SELECT sqlite_version(*)
46
+  (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
47
+  (0.4ms) SELECT sqlite_version(*)
48
+  (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
49
+  (0.0ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", "environment"]]
50
+  (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
51
+  (0.0ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", "environment"]]
52
+  (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
53
+  (0.0ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", "environment"]]
54
+  (0.0ms) SELECT sqlite_version(*)
55
+  (0.0ms) SELECT sqlite_version(*)
56
+  (0.0ms) DROP TABLE IF EXISTS "asyncapi_server_jobs"
57
+  (0.4ms) CREATE TABLE "asyncapi_server_jobs" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "status" integer, "callback_url" varchar, "class_name" varchar, "params" text, "secret" varchar)
58
+  (0.3ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
59
+  (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
60
+  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES (20150201231018)
61
+  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES
62
+ (20141112034324),
63
+ (20141212064931),
64
+ (20150130062520);
65
+
66
+ 
67
+  (0.3ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)
68
+ ActiveRecord::InternalMetadata Load (0.0ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
69
+ TRANSACTION (0.0ms) begin transaction
70
+ ActiveRecord::InternalMetadata Create (0.1ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "development"], ["created_at", "2022-03-21 17:20:22.487005"], ["updated_at", "2022-03-21 17:20:22.487005"]]
71
+ TRANSACTION (0.2ms) commit transaction
72
+ ActiveRecord::InternalMetadata Load (0.0ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
73
+ TRANSACTION (0.0ms) begin transaction
74
+ ActiveRecord::InternalMetadata Update (0.1ms) UPDATE "ar_internal_metadata" SET "value" = ?, "updated_at" = ? WHERE "ar_internal_metadata"."key" = ? [["value", "test"], ["updated_at", "2022-03-21 17:20:22.488003"], ["key", "environment"]]
75
+ TRANSACTION (0.2ms) commit transaction
76
+ ActiveRecord::InternalMetadata Load (0.0ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "schema_sha1"], ["LIMIT", 1]]
77
+ TRANSACTION (0.0ms) begin transaction
78
+ ActiveRecord::InternalMetadata Create (0.1ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "schema_sha1"], ["value", "b156e6c6d273062fcb56e7a3782b664b02612fc5"], ["created_at", "2022-03-21 17:20:22.488753"], ["updated_at", "2022-03-21 17:20:22.488753"]]
79
+ TRANSACTION (0.2ms) commit transaction