Skip to content

Commit

Permalink
Remove que from project
Browse files Browse the repository at this point in the history
  • Loading branch information
mirrec committed Oct 7, 2023
1 parent 7541f29 commit 45f19a4
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 371 deletions.
5 changes: 1 addition & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@ gem 'jbuilder'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

# Gems for tracking the statuses of jobs
gem 'que'
gem 'que-web'

# Workers
gem 'good_job'

# Reduces boot times through caching; required in config/boot.rb
Expand Down
13 changes: 0 additions & 13 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,6 @@ GEM
minitest (5.20.0)
msgpack (1.7.2)
multi_xml (0.6.0)
mustermann (3.0.0)
ruby2_keywords (~> 0.0.1)
net-imap (0.4.0)
date
net-protocol
Expand Down Expand Up @@ -310,10 +308,6 @@ GEM
public_suffix (5.0.3)
puma (6.4.0)
nio4r (~> 2.0)
que (2.2.1)
que-web (0.10.0)
que (>= 1)
sinatra
raabro (1.4.0)
racc (1.7.1)
rack (2.2.8)
Expand Down Expand Up @@ -417,11 +411,6 @@ GEM
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.4)
sinatra (3.1.0)
mustermann (~> 3.0)
rack (~> 2.2, >= 2.2.4)
rack-protection (= 3.1.0)
tilt (~> 2.0)
sitemap_generator (6.3.0)
builder (~> 3.0)
snaky_hash (2.0.1)
Expand Down Expand Up @@ -511,8 +500,6 @@ DEPENDENCIES
premailer-rails
pry-rails
puma
que
que-web
rails (~> 7.0.8)
rails-controller-testing (~> 1.0)
rails-i18n
Expand Down
8 changes: 0 additions & 8 deletions config.ru
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
# This file is used by Rack-based servers to start the application.

# Added que-web gem for showing job tracking
require 'que/web'

map '/admin/que' do
run Que::Web
end

require_relative 'config/environment'
run Rails.application
2 changes: 0 additions & 2 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,3 @@ class Application < Rails::Application
}
end
end

require "que/active_record/model"
5 changes: 0 additions & 5 deletions config/initializers/queweb.rb

This file was deleted.

4 changes: 0 additions & 4 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@
put :hide, on: :member
end

# Route for que
require 'que/web'
mount Que::Web => '/admin/que'

mount GoodJob::Engine => 'good_job'
end

Expand Down
4 changes: 2 additions & 2 deletions db/migrate/20190423214925_add_que.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
class AddQue < ActiveRecord::Migration[4.2]
def self.up
# The current version as of this migration's creation.
Que.migrate! :version => 3
# Que.migrate! :version => 3
end

def self.down
# Completely removes Que's job queue.
Que.migrate! :version => 0
# Que.migrate! :version => 0
end
end
2 changes: 1 addition & 1 deletion db/migrate/20190915104202_upgrade_que.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class UpgradeQue < ActiveRecord::Migration[6.0]
def up
Que.migrate!(version: 4)
# Que.migrate!(version: 4)
end
end
2 changes: 1 addition & 1 deletion db/migrate/20220322180237_upgrade_que_v5.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class UpgradeQueV5 < ActiveRecord::Migration[6.1]
def up
Que.migrate!(version: 5)
# Que.migrate!(version: 5)
end
end

2 changes: 1 addition & 1 deletion db/migrate/20230325092744_bump_que_version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class BumpQueVersion < ActiveRecord::Migration[6.1]
def up
Que.migrate!(version: 7)
# Que.migrate!(version: 7)
end
end
11 changes: 11 additions & 0 deletions db/migrate/20231007153003_remove_que_jobs.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class RemoveQueJobs < ActiveRecord::Migration[7.0]
def up
drop_table :que_jobs, force: :cascade, if_exists: true
drop_table :que_values, force: :cascade, if_exists: true
drop_table :que_lockers, force: :cascade, if_exists: true

execute 'DROP FUNCTION IF EXISTS que_validate_tags CASCADE'
execute 'DROP FUNCTION IF EXISTS que_state_notify CASCADE'
execute 'DROP FUNCTION IF EXISTS que_job_notify CASCADE'
end
end
Loading

0 comments on commit 45f19a4

Please sign in to comment.