asyncapi-server 1.1.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/MIT-LICENSE +1 -1
- data/README.md +39 -2
- data/app/controllers/asyncapi/server/v1/jobs_controller.rb +2 -1
- data/app/serializers/asyncapi/server/job_serializer.rb +1 -1
- data/app/workers/asyncapi/server/job_status_notifier_worker.rb +51 -0
- data/app/workers/asyncapi/server/job_worker.rb +16 -18
- 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.rb +3 -0
- data/lib/asyncapi/server/rails_ext/controller.rb +3 -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/db/development.sqlite3 +0 -0
- data/spec/dummy/db/schema.rb +2 -2
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +81 -0
- data/spec/dummy/log/test.log +2011 -0
- data/spec/models/job_spec.rb +1 -1
- data/spec/requests/enqueueing_jobs_spec.rb +10 -19
- data/spec/serializers/job_serializer_spec.rb +1 -0
- data/spec/spec_helper.rb +5 -4
- data/spec/workers/job_status_notifier_worker_spec.rb +115 -0
- data/spec/workers/job_worker_spec.rb +9 -30
- metadata +91 -47
- data/spec/dummy/db/migrate/20141212065005_create_asyncapi_server_jobs.asyncapi_server.rb +0 -11
- data/spec/dummy/db/migrate/20141212065006_add_secret_to_asyncapi_server_job.asyncapi_server.rb +0 -6
- data/spec/dummy/db/migrate/20150130062901_add_expired_at_to_asyncapi_server_job.asyncapi_server.rb +0 -12
- data/spec/dummy/db/migrate/20150201231329_drop_expired_at_from_asyncapi_server_jobs.asyncapi_server.rb +0 -10
@@ -1,11 +0,0 @@
|
|
1
|
-
# This migration comes from asyncapi_server (originally 20141112034324)
|
2
|
-
class CreateAsyncapiServerJobs < ActiveRecord::Migration
|
3
|
-
def change
|
4
|
-
create_table :asyncapi_server_jobs do |t|
|
5
|
-
t.integer :status
|
6
|
-
t.string :callback_url
|
7
|
-
t.string :class_name
|
8
|
-
t.text :params
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
data/spec/dummy/db/migrate/20150130062901_add_expired_at_to_asyncapi_server_job.asyncapi_server.rb
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
# This migration comes from asyncapi_server (originally 20150130062520)
|
2
|
-
class AddExpiredAtToAsyncapiServerJob < ActiveRecord::Migration
|
3
|
-
def change
|
4
|
-
add_column :asyncapi_server_jobs, :expired_at, :datetime
|
5
|
-
|
6
|
-
Asyncapi::Server::Job.reset_column_information
|
7
|
-
|
8
|
-
Asyncapi::Server::Job.
|
9
|
-
where(Asyncapi::Server::Job.arel_table[:expired_at].eq(nil)).
|
10
|
-
update_all(expired_at: Asyncapi::Server.expiry_threshold.from_now)
|
11
|
-
end
|
12
|
-
end
|
@@ -1,10 +0,0 @@
|
|
1
|
-
# This migration comes from asyncapi_server (originally 20150201231018)
|
2
|
-
class DropExpiredAtFromAsyncapiServerJobs < ActiveRecord::Migration
|
3
|
-
def up
|
4
|
-
remove_column :asyncapi_server_jobs, :expired_at
|
5
|
-
end
|
6
|
-
|
7
|
-
def down
|
8
|
-
add_column :asyncapi_server_jobs, :expired_at, :datetime
|
9
|
-
end
|
10
|
-
end
|