From a49d43d1121ac10f96d5a9cbf78112c707e7a59e Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 5 Jan 2019 12:43:28 +0100 Subject: Add scheduled statuses (#9706) Fix #340 --- config/locales/en.yml | 4 ++++ config/routes.rb | 1 + config/sidekiq.yml | 3 +++ 3 files changed, 8 insertions(+) (limited to 'config') diff --git a/config/locales/en.yml b/config/locales/en.yml index 6c78b9fc9..7e05568f1 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -728,6 +728,10 @@ en: error: Error title: Title unfollowed: Unfollowed + scheduled_statuses: + over_daily_limit: You have exceeded the limit of %{limit} scheduled toots for that day + over_total_limit: You have exceeded the limit of %{limit} scheduled toots + too_soon: The scheduled date must be in the future sessions: activity: Last activity browser: Browser diff --git a/config/routes.rb b/config/routes.rb index 5bdd1986c..3ae2735d1 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -283,6 +283,7 @@ Rails.application.routes.draw do resources :streaming, only: [:index] resources :custom_emojis, only: [:index] resources :suggestions, only: [:index, :destroy] + resources :scheduled_statuses, only: [:index, :show, :update, :destroy] resources :conversations, only: [:index, :destroy] do member do diff --git a/config/sidekiq.yml b/config/sidekiq.yml index c44af5b6c..0ec1742ab 100644 --- a/config/sidekiq.yml +++ b/config/sidekiq.yml @@ -6,6 +6,9 @@ - [mailers, 2] - [pull] :schedule: + scheduled_statuses_scheduler: + every: '5m' + class: Scheduler::ScheduledStatusesScheduler subscriptions_scheduler: cron: '<%= Random.rand(0..59) %> <%= Random.rand(4..6) %> * * *' class: Scheduler::SubscriptionsScheduler -- cgit