about summary refs log tree commit diff
path: root/config
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-01-05 12:43:28 +0100
committerGitHub <noreply@github.com>2019-01-05 12:43:28 +0100
commita49d43d1121ac10f96d5a9cbf78112c707e7a59e (patch)
treeee311cf3d68d695f6cc6c69ce9e1b01c6ad4aeb4 /config
parentb17b2f25acc4d0cd4284835f28364451cb2fcd88 (diff)
Add scheduled statuses (#9706)
Fix #340
Diffstat (limited to 'config')
-rw-r--r--config/locales/en.yml4
-rw-r--r--config/routes.rb1
-rw-r--r--config/sidekiq.yml3
3 files changed, 8 insertions, 0 deletions
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