All checks were successful
Build and Publish Docker Container / build (push) Successful in 5m49s
46 lines
1.3 KiB
Ruby
46 lines
1.3 KiB
Ruby
require_relative "boot"
|
|
|
|
require "rails/all"
|
|
|
|
# Require the gems listed in Gemfile, including any gems
|
|
# you've limited to :test, :development, or :production.
|
|
Bundler.require(*Rails.groups)
|
|
|
|
module LectureAttendanceManager
|
|
class Application < Rails::Application
|
|
# Initialize configuration defaults for originally generated Rails version.
|
|
config.load_defaults 7.0
|
|
|
|
# config.active_job.queue_adapter = :sidekiq
|
|
config.active_job.queue_adapter = :good_job
|
|
|
|
config.hosts << "lectures.joshuacoles.me"
|
|
config.action_controller.forgery_protection_origin_check = false
|
|
|
|
# Disable sass to make tailwind work
|
|
config.assets.css_compressor = nil
|
|
|
|
# Good Job Cron Jobs
|
|
|
|
# Enable cron in this process
|
|
config.good_job.enable_cron = ENV['RUNNER'].present? && ENV['RUNNER'] == '1'
|
|
|
|
# Configure cron with a hash that has a unique key for each recurring job
|
|
config.good_job.cron = {
|
|
lecture_checkin_job: {
|
|
cron: '14 * * * 1,2,3,4,5',
|
|
class: 'LectureCheckinJob',
|
|
},
|
|
# TODO: Uncomment when Panopto is used again
|
|
# scrape_panopto_job: {
|
|
# cron: '* * * * 1,2,3,4,5',
|
|
# class: 'ScrapePanoptoJob',
|
|
# },
|
|
scrape_toggl_job: {
|
|
cron: '10 * * * 1,2,3,4,5',
|
|
class: 'ScrapeTogglJob',
|
|
},
|
|
}
|
|
end
|
|
end
|