feat: Add Cron Jobs In Chatwoot and update installation notice (#1630)
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
schedule_file = 'config/schedule.yml'
|
||||
|
||||
Sidekiq.configure_client do |config|
|
||||
config.redis = Redis::Config.sidekiq
|
||||
end
|
||||
@@ -5,3 +7,6 @@ end
|
||||
Sidekiq.configure_server do |config|
|
||||
config.redis = Redis::Config.sidekiq
|
||||
end
|
||||
|
||||
# https://github.com/ondrejbartas/sidekiq-cron
|
||||
Sidekiq::Cron::Job.load_from_hash YAML.load_file(schedule_file) if File.exist?(schedule_file) && Sidekiq.server?
|
||||
|
||||
@@ -189,6 +189,7 @@ Rails.application.routes.draw do
|
||||
# ----------------------------------------------------------------------
|
||||
# Internal Monitoring Routes
|
||||
require 'sidekiq/web'
|
||||
require 'sidekiq/cron/web'
|
||||
|
||||
devise_for :super_admins, path: 'super_admin', controllers: { sessions: 'super_admin/devise/sessions' }
|
||||
devise_scope :super_admin do
|
||||
|
||||
8
config/schedule.yml
Normal file
8
config/schedule.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
# https://github.com/ondrejbartas/sidekiq-cron
|
||||
# use https://crontab.guru/ to validate
|
||||
|
||||
# executed At 12:00 on every day-of-month.
|
||||
internal_check_new_versions_job:
|
||||
cron: "0 12 */1 * *"
|
||||
class: "Internal::CheckNewVersionsJob"
|
||||
queue: scheduled_jobs
|
||||
@@ -12,11 +12,12 @@
|
||||
# http://www.mikeperham.com/2013/11/13/advanced-sidekiq-host-specific-queues/
|
||||
:queues:
|
||||
- [low, 1]
|
||||
- [scheduled_jobs, 1]
|
||||
- [webhooks, 1]
|
||||
- [integrations, 2]
|
||||
- [bots, 1]
|
||||
- [active_storage_analysis, 1]
|
||||
- [action_mailbox_incineration, 1]
|
||||
- [integrations, 2]
|
||||
- [default, 2]
|
||||
- [mailers, 2]
|
||||
- [medium, 3]
|
||||
|
||||
Reference in New Issue
Block a user