mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 09:57:23 +02:00
Added que #2557
This commit is contained in:
parent
0aa8058022
commit
51d22af52b
9 changed files with 4779 additions and 2 deletions
4
Gemfile
4
Gemfile
|
@ -76,6 +76,10 @@ gem 'epp', '~> 1.4.2', github: 'gitlabeu/epp'
|
|||
gem 'epp-xml', '~> 1.0.2' # EPP XMLs
|
||||
gem 'uuidtools', '~> 2.1.4' # For unique IDs (used by the epp gem)
|
||||
|
||||
# que
|
||||
gem 'que', '~> 0.10.0'
|
||||
gem 'que-web', '~> 0.4.0'
|
||||
|
||||
# for importing legacy db
|
||||
gem 'activerecord-import', '~> 0.7.0' # for inserting dummy data
|
||||
|
||||
|
|
13
Gemfile.lock
13
Gemfile.lock
|
@ -317,11 +317,18 @@ GEM
|
|||
coderay (~> 1.1.0)
|
||||
method_source (~> 0.8.1)
|
||||
slop (~> 3.4)
|
||||
que (0.10.0)
|
||||
que-web (0.4.0)
|
||||
erubis
|
||||
que (~> 0.8)
|
||||
sinatra
|
||||
rack (1.6.1)
|
||||
rack-accept (0.4.5)
|
||||
rack (>= 0.4)
|
||||
rack-mount (0.8.3)
|
||||
rack (>= 1.0.0)
|
||||
rack-protection (1.5.3)
|
||||
rack
|
||||
rack-test (0.6.3)
|
||||
rack (>= 1.0)
|
||||
railroady (1.3.0)
|
||||
|
@ -444,6 +451,10 @@ GEM
|
|||
simplecov-html (~> 0.9.0)
|
||||
simplecov-html (0.9.0)
|
||||
simpleidn (0.0.5)
|
||||
sinatra (1.4.6)
|
||||
rack (~> 1.4)
|
||||
rack-protection (~> 1.4)
|
||||
tilt (>= 1.3, < 3)
|
||||
slim (2.1.0)
|
||||
temple (~> 0.6.9)
|
||||
tilt (>= 1.3.3, < 2.1)
|
||||
|
@ -562,6 +573,8 @@ DEPENDENCIES
|
|||
phantomjs-binaries (~> 1.9.2.4)
|
||||
poltergeist (~> 1.5.1)
|
||||
pry (~> 0.10.1)
|
||||
que (~> 0.10.0)
|
||||
que-web (~> 0.4.0)
|
||||
railroady (~> 1.3.0)
|
||||
rails (= 4.2.1)
|
||||
rails-settings-cached (~> 0.4.1)
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
-# %li= link_to t(:domains_history), admin_domain_versions_path
|
||||
%li= link_to t(:epp_logs), admin_epp_logs_path
|
||||
%li= link_to t(:repp_logs), admin_repp_logs_path
|
||||
-# %li= link_to t(:background_jobs), admin_delayed_jobs_path
|
||||
%li= link_to t(:que), '/admin/que'
|
||||
|
||||
- if signed_in?
|
||||
%ul.nav.navbar-nav.navbar-right
|
||||
|
|
|
@ -49,6 +49,8 @@ module Registry
|
|||
# Instead, the errors will propagate normally just like in other Active Record callbacks.
|
||||
config.active_record.raise_in_transactional_callbacks = true
|
||||
|
||||
config.active_record.schema_format = :sql
|
||||
|
||||
config.generators do |g|
|
||||
g.stylesheets false
|
||||
g.javascripts false
|
||||
|
|
|
@ -224,6 +224,10 @@ Rails.application.routes.draw do
|
|||
get 'logout' => '/devise/sessions#destroy'
|
||||
end
|
||||
|
||||
authenticate :user do
|
||||
mount Que::Web, at: 'que'
|
||||
end
|
||||
|
||||
root 'dashboards#show'
|
||||
end
|
||||
|
||||
|
|
11
db/migrate/20150611124920_add_que.rb
Normal file
11
db/migrate/20150611124920_add_que.rb
Normal file
|
@ -0,0 +1,11 @@
|
|||
class AddQue < ActiveRecord::Migration
|
||||
def self.up
|
||||
# The current version as of this migration's creation.
|
||||
Que.migrate! :version => 3
|
||||
end
|
||||
|
||||
def self.down
|
||||
# Completely removes Que's job queue.
|
||||
Que.migrate! :version => 0
|
||||
end
|
||||
end
|
14
db/schema.rb
14
db/schema.rb
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20150609103333) do
|
||||
ActiveRecord::Schema.define(version: 20150611124920) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
@ -306,6 +306,7 @@ ActiveRecord::Schema.define(version: 20150609103333) do
|
|||
t.datetime "registrant_verification_asked_at"
|
||||
t.string "registrant_verification_token"
|
||||
t.json "pending_json"
|
||||
t.datetime "force_delete_at"
|
||||
end
|
||||
|
||||
add_index "domains", ["delete_at"], name: "index_domains_on_delete_at", using: :btree
|
||||
|
@ -900,6 +901,17 @@ ActiveRecord::Schema.define(version: 20150609103333) do
|
|||
t.string "operation_category"
|
||||
end
|
||||
|
||||
create_table "que_jobs", id: false, force: :cascade do |t|
|
||||
t.integer "priority", limit: 2, default: 100, null: false
|
||||
t.datetime "run_at", default: "now()", null: false
|
||||
t.integer "job_id", limit: 8, default: "nextval('que_jobs_job_id_seq'::regclass)", null: false
|
||||
t.text "job_class", null: false
|
||||
t.json "args", default: [], null: false
|
||||
t.integer "error_count", default: 0, null: false
|
||||
t.text "last_error"
|
||||
t.text "queue", default: "", null: false
|
||||
end
|
||||
|
||||
create_table "registrant_verifications", force: :cascade do |t|
|
||||
t.string "domain_name"
|
||||
t.string "verification_token"
|
||||
|
|
4730
db/structure.sql
Normal file
4730
db/structure.sql
Normal file
File diff suppressed because it is too large
Load diff
|
@ -2,6 +2,7 @@ class DeviseCustomFailure < Devise::FailureApp
|
|||
def redirect_url
|
||||
return registrant_login_url if request.original_fullpath.to_s.match(/^\/registrant/)
|
||||
return registrar_login_url if request.original_fullpath.to_s.match(/^\/registrar/)
|
||||
return '/admin' if request.original_fullpath.to_s.match(/^\/admin\/que/)
|
||||
return admin_login_url if request.original_fullpath.to_s.match(/^\/admin/)
|
||||
root_url
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue