From 051f2be93f0bc22f67545c09b26d3f692a11477c Mon Sep 17 00:00:00 2001 From: evazion Date: Mon, 20 Sep 2021 01:30:52 -0500 Subject: [PATCH] gems: remove `whenever` gem. We're now using the `clockwork` gem for cronjobs in production. See config/initializers/clockwork.rb. --- Capfile | 1 - Gemfile | 1 - Gemfile.lock | 4 ---- bin/whenever | 29 ----------------------------- config/schedule.rb | 26 -------------------------- 5 files changed, 61 deletions(-) delete mode 100755 bin/whenever delete mode 100644 config/schedule.rb diff --git a/Capfile b/Capfile index cc4693c23..9d7f1f7e8 100644 --- a/Capfile +++ b/Capfile @@ -10,7 +10,6 @@ install_plugin Capistrano::SCM::Git # Include tasks from other gems included in your Gemfile require 'capistrano/rbenv' require 'capistrano/rails' -require 'whenever/capistrano' require 'capistrano3/unicorn' require 'capistrano/deploytags' require 'new_relic/recipes' diff --git a/Gemfile b/Gemfile index 898d6802a..030fe6d19 100644 --- a/Gemfile +++ b/Gemfile @@ -7,7 +7,6 @@ gem "pg" gem "delayed_job" gem "delayed_job_active_record" gem "simple_form" -gem "whenever", :require => false gem "sanitize" gem 'ruby-vips' gem 'net-sftp' diff --git a/Gemfile.lock b/Gemfile.lock index bbc88a030..c86bbbafd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -140,7 +140,6 @@ GEM regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) childprocess (3.0.0) - chronic (0.10.2) clockwork (2.0.4) activesupport tzinfo @@ -503,8 +502,6 @@ GEM websocket-driver (0.7.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - whenever (1.0.0) - chronic (>= 0.6.3) xpath (3.2.0) nokogiri (~> 1.8) yard (0.9.26) @@ -598,7 +595,6 @@ DEPENDENCIES unicorn-worker-killer view_component webpacker (= 6.0.0.beta.6) - whenever BUNDLED WITH 2.1.4 diff --git a/bin/whenever b/bin/whenever deleted file mode 100755 index aa4314435..000000000 --- a/bin/whenever +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env ruby -# frozen_string_literal: true - -# -# This file was generated by Bundler. -# -# The application 'whenever' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require "pathname" -ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -bundle_binstub = File.expand_path("../bundle", __FILE__) - -if File.file?(bundle_binstub) - if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/ - load(bundle_binstub) - else - abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. -Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") - end -end - -require "rubygems" -require "bundler/setup" - -load Gem.bin_path("whenever", "whenever") diff --git a/config/schedule.rb b/config/schedule.rb deleted file mode 100644 index 9ecfdf7db..000000000 --- a/config/schedule.rb +++ /dev/null @@ -1,26 +0,0 @@ -# This file is used by the `whenver` gem to generate a crontab that runs -# Danbooru's maintenance tasks. -# -# @see app/logical/danbooru_maintenance.rb -# @see https://github.com/javan/whenever - -# this is used in config/environments/production.rb. -env "RAILS_LOG_TO_STDOUT", "true" - -set :output, "log/whenever.log" - -every :hour do - rake "maintenance:hourly" -end - -every :day do - rake "maintenance:daily" -end - -every :sunday do - rake "maintenance:weekly" -end - -every :month do - rake "maintenance:monthly" -end