Disable Delayed Job scheduler and Telegram bots
This commit is contained in:
parent
3203bf13c4
commit
fe82a1de21
2
Capfile
2
Capfile
@ -16,7 +16,7 @@ require 'capistrano/rails/assets'
|
|||||||
require 'capistrano/rails/migrations'
|
require 'capistrano/rails/migrations'
|
||||||
require 'capistrano/postgresql'
|
require 'capistrano/postgresql'
|
||||||
#require 'capistrano/bower'
|
#require 'capistrano/bower'
|
||||||
require 'capistrano/delayed_job'
|
# TODO enable job scheduler require 'capistrano/delayed_job'
|
||||||
|
|
||||||
|
|
||||||
# Includes tasks from other gems included in your Gemfile
|
# Includes tasks from other gems included in your Gemfile
|
||||||
|
|||||||
10
Gemfile
10
Gemfile
@ -38,7 +38,7 @@ group :development do
|
|||||||
gem 'capistrano-nginx', github: 'koenpunt/capistrano-nginx'
|
gem 'capistrano-nginx', github: 'koenpunt/capistrano-nginx'
|
||||||
gem "capistrano-db-tasks", require: false
|
gem "capistrano-db-tasks", require: false
|
||||||
gem "capistrano-postgresql" #, '~> 4.2.0'
|
gem "capistrano-postgresql" #, '~> 4.2.0'
|
||||||
gem 'capistrano3-delayed-job', '~> 1.0'
|
# TODO enable job scheduler gem 'capistrano3-delayed-job', '~> 1.0'
|
||||||
# required for ecdsa key
|
# required for ecdsa key
|
||||||
gem "bcrypt_pbkdf", require: false
|
gem "bcrypt_pbkdf", require: false
|
||||||
gem "net-ssh", ">= 4.0.0", require: false
|
gem "net-ssh", ">= 4.0.0", require: false
|
||||||
@ -84,8 +84,8 @@ gem 'importmap-rails'
|
|||||||
gem 'turbo-rails'
|
gem 'turbo-rails'
|
||||||
gem 'stimulus-rails'
|
gem 'stimulus-rails'
|
||||||
gem 'will_paginate'
|
gem 'will_paginate'
|
||||||
gem 'telegram-bot-ruby', '~> 1.0'
|
# TODO enable telegram bots with job scheduler gem 'telegram-bot-ruby', '~> 1.0'
|
||||||
gem 'delayed_job_active_record'
|
# TODO enable job scheduler gem 'delayed_job_active_record'
|
||||||
gem 'daemons'
|
# TODO enable job scheduler gem 'daemons'
|
||||||
|
|
||||||
gem "activejob-status", "~> 1.0"
|
# TODO enable job scheduler gem "activejob-status", "~> 1.0"
|
||||||
|
|||||||
50
Gemfile.lock
50
Gemfile.lock
@ -60,9 +60,6 @@ GEM
|
|||||||
activejob (7.1.2)
|
activejob (7.1.2)
|
||||||
activesupport (= 7.1.2)
|
activesupport (= 7.1.2)
|
||||||
globalid (>= 0.3.6)
|
globalid (>= 0.3.6)
|
||||||
activejob-status (1.0.0)
|
|
||||||
activejob (>= 6.0)
|
|
||||||
activesupport (>= 6.0)
|
|
||||||
activemodel (7.1.2)
|
activemodel (7.1.2)
|
||||||
activesupport (= 7.1.2)
|
activesupport (= 7.1.2)
|
||||||
activerecord (7.1.2)
|
activerecord (7.1.2)
|
||||||
@ -126,9 +123,6 @@ GEM
|
|||||||
capistrano-rbenv (2.2.0)
|
capistrano-rbenv (2.2.0)
|
||||||
capistrano (~> 3.1)
|
capistrano (~> 3.1)
|
||||||
sshkit (~> 1.3)
|
sshkit (~> 1.3)
|
||||||
capistrano3-delayed-job (1.7.6)
|
|
||||||
capistrano (~> 3.0, >= 3.0.0)
|
|
||||||
daemons (~> 1.3)
|
|
||||||
capistrano3-puma (6.0.0.beta.1)
|
capistrano3-puma (6.0.0.beta.1)
|
||||||
capistrano (~> 3.7)
|
capistrano (~> 3.7)
|
||||||
capistrano-bundler
|
capistrano-bundler
|
||||||
@ -162,7 +156,6 @@ GEM
|
|||||||
concurrent-ruby (1.2.2)
|
concurrent-ruby (1.2.2)
|
||||||
connection_pool (2.4.1)
|
connection_pool (2.4.1)
|
||||||
crass (1.0.6)
|
crass (1.0.6)
|
||||||
daemons (1.4.1)
|
|
||||||
database_cleaner (2.0.2)
|
database_cleaner (2.0.2)
|
||||||
database_cleaner-active_record (>= 2, < 3)
|
database_cleaner-active_record (>= 2, < 3)
|
||||||
database_cleaner-active_record (2.1.0)
|
database_cleaner-active_record (2.1.0)
|
||||||
@ -171,11 +164,6 @@ GEM
|
|||||||
database_cleaner-core (2.0.1)
|
database_cleaner-core (2.0.1)
|
||||||
date (3.3.4)
|
date (3.3.4)
|
||||||
debug_inspector (1.1.0)
|
debug_inspector (1.1.0)
|
||||||
delayed_job (4.1.11)
|
|
||||||
activesupport (>= 3.0, < 8.0)
|
|
||||||
delayed_job_active_record (4.1.8)
|
|
||||||
activerecord (>= 3.0, < 8.0)
|
|
||||||
delayed_job (>= 3.0, < 5)
|
|
||||||
devise (4.9.3)
|
devise (4.9.3)
|
||||||
bcrypt (~> 3.0)
|
bcrypt (~> 3.0)
|
||||||
orm_adapter (~> 0.1)
|
orm_adapter (~> 0.1)
|
||||||
@ -193,25 +181,6 @@ GEM
|
|||||||
railties (>= 3.2)
|
railties (>= 3.2)
|
||||||
drb (2.2.0)
|
drb (2.2.0)
|
||||||
ruby2_keywords
|
ruby2_keywords
|
||||||
dry-core (1.0.1)
|
|
||||||
concurrent-ruby (~> 1.0)
|
|
||||||
zeitwerk (~> 2.6)
|
|
||||||
dry-inflector (1.0.0)
|
|
||||||
dry-logic (1.5.0)
|
|
||||||
concurrent-ruby (~> 1.0)
|
|
||||||
dry-core (~> 1.0, < 2)
|
|
||||||
zeitwerk (~> 2.6)
|
|
||||||
dry-struct (1.6.0)
|
|
||||||
dry-core (~> 1.0, < 2)
|
|
||||||
dry-types (>= 1.7, < 2)
|
|
||||||
ice_nine (~> 0.11)
|
|
||||||
zeitwerk (~> 2.6)
|
|
||||||
dry-types (1.7.1)
|
|
||||||
concurrent-ruby (~> 1.0)
|
|
||||||
dry-core (~> 1.0)
|
|
||||||
dry-inflector (~> 1.0)
|
|
||||||
dry-logic (~> 1.4)
|
|
||||||
zeitwerk (~> 2.6)
|
|
||||||
ed25519 (1.3.0)
|
ed25519 (1.3.0)
|
||||||
em-websocket (0.5.3)
|
em-websocket (0.5.3)
|
||||||
eventmachine (>= 0.12.9)
|
eventmachine (>= 0.12.9)
|
||||||
@ -227,13 +196,6 @@ GEM
|
|||||||
railties (>= 3.0.0)
|
railties (>= 3.0.0)
|
||||||
faker (3.2.2)
|
faker (3.2.2)
|
||||||
i18n (>= 1.8.11, < 2)
|
i18n (>= 1.8.11, < 2)
|
||||||
faraday (2.7.12)
|
|
||||||
base64
|
|
||||||
faraday-net_http (>= 2.0, < 3.1)
|
|
||||||
ruby2_keywords (>= 0.0.4)
|
|
||||||
faraday-multipart (1.0.4)
|
|
||||||
multipart-post (~> 2)
|
|
||||||
faraday-net_http (3.0.2)
|
|
||||||
ffi (1.16.3)
|
ffi (1.16.3)
|
||||||
formatador (1.1.0)
|
formatador (1.1.0)
|
||||||
friendly_id (5.4.2)
|
friendly_id (5.4.2)
|
||||||
@ -288,7 +250,6 @@ GEM
|
|||||||
hub (1.12.4)
|
hub (1.12.4)
|
||||||
i18n (1.14.1)
|
i18n (1.14.1)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
ice_nine (0.11.2)
|
|
||||||
importmap-rails (1.2.3)
|
importmap-rails (1.2.3)
|
||||||
actionpack (>= 6.0.0)
|
actionpack (>= 6.0.0)
|
||||||
activesupport (>= 6.0.0)
|
activesupport (>= 6.0.0)
|
||||||
@ -333,7 +294,6 @@ GEM
|
|||||||
mini_portile2 (2.8.5)
|
mini_portile2 (2.8.5)
|
||||||
minitest (5.20.0)
|
minitest (5.20.0)
|
||||||
multi_json (1.15.0)
|
multi_json (1.15.0)
|
||||||
multipart-post (2.3.0)
|
|
||||||
mutex_m (0.2.0)
|
mutex_m (0.2.0)
|
||||||
nenv (0.3.0)
|
nenv (0.3.0)
|
||||||
net-imap (0.4.7)
|
net-imap (0.4.7)
|
||||||
@ -533,11 +493,6 @@ GEM
|
|||||||
stimulus-rails (1.3.0)
|
stimulus-rails (1.3.0)
|
||||||
railties (>= 6.0.0)
|
railties (>= 6.0.0)
|
||||||
stringio (3.1.0)
|
stringio (3.1.0)
|
||||||
telegram-bot-ruby (1.0.0)
|
|
||||||
dry-struct (~> 1.6)
|
|
||||||
faraday (~> 2.0)
|
|
||||||
faraday-multipart (~> 1.0)
|
|
||||||
zeitwerk (~> 2.6)
|
|
||||||
temple (0.10.3)
|
temple (0.10.3)
|
||||||
thor (1.3.0)
|
thor (1.3.0)
|
||||||
tilt (2.3.0)
|
tilt (2.3.0)
|
||||||
@ -570,7 +525,6 @@ PLATFORMS
|
|||||||
x86_64-linux
|
x86_64-linux
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
activejob-status (~> 1.0)
|
|
||||||
bcrypt_pbkdf
|
bcrypt_pbkdf
|
||||||
better_errors
|
better_errors
|
||||||
binding_of_caller
|
binding_of_caller
|
||||||
@ -582,15 +536,12 @@ DEPENDENCIES
|
|||||||
capistrano-rails
|
capistrano-rails
|
||||||
capistrano-rails-console
|
capistrano-rails-console
|
||||||
capistrano-rbenv
|
capistrano-rbenv
|
||||||
capistrano3-delayed-job (~> 1.0)
|
|
||||||
capistrano3-puma (~> 6.0.beta)
|
capistrano3-puma (~> 6.0.beta)
|
||||||
capybara
|
capybara
|
||||||
capybara-screenshot
|
capybara-screenshot
|
||||||
ci_reporter_rspec
|
ci_reporter_rspec
|
||||||
coffee-rails
|
coffee-rails
|
||||||
daemons
|
|
||||||
database_cleaner
|
database_cleaner
|
||||||
delayed_job_active_record
|
|
||||||
devise
|
devise
|
||||||
devise_invitable
|
devise_invitable
|
||||||
dotenv-rails
|
dotenv-rails
|
||||||
@ -641,7 +592,6 @@ DEPENDENCIES
|
|||||||
spring-commands-rspec
|
spring-commands-rspec
|
||||||
sprockets
|
sprockets
|
||||||
stimulus-rails
|
stimulus-rails
|
||||||
telegram-bot-ruby (~> 1.0)
|
|
||||||
turbo-rails
|
turbo-rails
|
||||||
webdrivers
|
webdrivers
|
||||||
will_paginate
|
will_paginate
|
||||||
|
|||||||
@ -23,7 +23,8 @@ class BotsController < ApplicationController
|
|||||||
|
|
||||||
def telegram_listen
|
def telegram_listen
|
||||||
authorize @bot
|
authorize @bot
|
||||||
@bot.delay.telegram_listen
|
# TODO enable bots with job scheduler
|
||||||
|
# @bot.delay.telegram_listen
|
||||||
redirect_to request.referrer
|
redirect_to request.referrer
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
require_relative "boot"
|
require_relative "boot"
|
||||||
|
|
||||||
require "rails/all"
|
require "rails/all"
|
||||||
require 'telegram/bot'
|
# TODO enable telegram bots with job scheduler require 'telegram/bot'
|
||||||
|
|
||||||
# Require the gems listed in Gemfile, including any gems
|
# Require the gems listed in Gemfile, including any gems
|
||||||
# you've limited to :test, :development, or :production.
|
# you've limited to :test, :development, or :production.
|
||||||
@ -20,6 +20,6 @@ module MyTendyZone
|
|||||||
#
|
#
|
||||||
# config.time_zone = "Central Time (US & Canada)"
|
# config.time_zone = "Central Time (US & Canada)"
|
||||||
# config.eager_load_paths << Rails.root.join("extras")
|
# config.eager_load_paths << Rails.root.join("extras")
|
||||||
config.active_job.queue_adapter = :delayed_job
|
# TODO enable job scheduler config.active_job.queue_adapter = :delayed_job
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -2,4 +2,4 @@
|
|||||||
# Available options are: :status, :serialized_job, :exception
|
# Available options are: :status, :serialized_job, :exception
|
||||||
# Default is [:status]
|
# Default is [:status]
|
||||||
#
|
#
|
||||||
ActiveJob::Status.options = { includes: %i[status exception] }
|
# TODO enable job scheduler ActiveJob::Status.options = { includes: %i[status exception] }
|
||||||
|
|||||||
@ -79,7 +79,7 @@ ActiveRecord::Schema[7.1].define(version: 2024_03_25_142502) do
|
|||||||
t.integer "sluggable_id", null: false
|
t.integer "sluggable_id", null: false
|
||||||
t.string "sluggable_type", limit: 50
|
t.string "sluggable_type", limit: 50
|
||||||
t.string "scope"
|
t.string "scope"
|
||||||
t.datetime "created_at"
|
t.datetime "created_at", precision: nil
|
||||||
t.index ["slug", "sluggable_type", "scope"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type_and_scope", unique: true
|
t.index ["slug", "sluggable_type", "scope"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type_and_scope", unique: true
|
||||||
t.index ["slug", "sluggable_type"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type"
|
t.index ["slug", "sluggable_type"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type"
|
||||||
t.index ["sluggable_type", "sluggable_id"], name: "index_friendly_id_slugs_on_sluggable_type_and_sluggable_id"
|
t.index ["sluggable_type", "sluggable_id"], name: "index_friendly_id_slugs_on_sluggable_type_and_sluggable_id"
|
||||||
@ -295,7 +295,6 @@ ActiveRecord::Schema[7.1].define(version: 2024_03_25_142502) do
|
|||||||
t.integer "invitations_count", default: 0
|
t.integer "invitations_count", default: 0
|
||||||
t.string "soft_token"
|
t.string "soft_token"
|
||||||
t.integer "win_count", default: 0
|
t.integer "win_count", default: 0
|
||||||
t.integer "points"
|
|
||||||
t.index ["email"], name: "index_users_on_email", unique: true
|
t.index ["email"], name: "index_users_on_email", unique: true
|
||||||
t.index ["invitation_token"], name: "index_users_on_invitation_token", unique: true
|
t.index ["invitation_token"], name: "index_users_on_invitation_token", unique: true
|
||||||
t.index ["invitations_count"], name: "index_users_on_invitations_count"
|
t.index ["invitations_count"], name: "index_users_on_invitations_count"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user