From 8ff1819d5a5b152c89d9c00ebb7cfd5f3e62a849 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=BF=E3=81=A6=E3=82=8B=E3=81=9E?= Date: Sun, 19 Apr 2026 23:04:15 +0900 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=9C=9F=E3=83=90=E3=82=B0=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=20(#324)=20(#325)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #324 Reviewed-on: https://git.miteruzo.com/miteruzo/btrc-hub/pulls/325 --- backend/config/schedule.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/backend/config/schedule.rb b/backend/config/schedule.rb index b4db72a..23b6c73 100644 --- a/backend/config/schedule.rb +++ b/backend/config/schedule.rb @@ -1,12 +1,19 @@ env :PATH, '/root/.rbenv/shims:/root/.rbenv/bin:/usr/local/bin:/usr/bin:/bin' +set :path, '/var/www/btrc-hub/backend' +set :environment, 'production' set :output, standard: '/var/log/btrc_hub_nico_sync.log', error: '/var/log/btrc_hub_nico_sync_err.log' -every 1.day, at: '3:00 pm' do +job_type :rake, + 'cd :path && set -a && . /etc/btrc-hub/backend.env && set +a && ' \ + ':environment_variable=:environment bundle exec rake :task --silent :output' + +every 1.day, at: '11:00 am' do rake 'nico:sync', environment: 'production' end every 1.day, at: '0:00 am' do rake 'post_similarity:calc', environment: 'production' + rake 'tag_similarity:calc', environment: 'production' end