Add step to setup scheduler; starting from 10.8

Rebuild view cache post upgrade
This commit is contained in:
2020-02-10 15:45:24 +01:00
parent 94f47d1cc8
commit 0f037ec8a1

View File

@@ -91,7 +91,6 @@ step_7() {
exe systemctl enable pixelfed.service exe systemctl enable pixelfed.service
exe service pixelfed start exe service pixelfed start
} }
horizonServiceLoc="/etc/systemd/system/pixelfed.service" horizonServiceLoc="/etc/systemd/system/pixelfed.service"
horizonService="\ horizonService="\
[Unit] [Unit]
@@ -123,8 +122,16 @@ Environment=
[Install] [Install]
WantedBy=multi-user.target" WantedBy=multi-user.target"
step_8_info() { echo "Nginx configuration"; } step_8_info() { echo "Create scheduler cron job"; }
step_8_alias() { ALIAS="scheduler"; }
step_8() { step_8() {
addConf -s "$schedulerCmd" "$schedulerCron"
}
schedulerCron="/etc/cron.d/pixelfedScheduler"
schedulerCmd="* * * * * cd ${toolPath} && php artisan schedule:run >>/dev/null 2>&1"
step_9_info() { echo "Nginx configuration"; }
step_9() {
addConf -c "$nginxConfig" "$nginxConfigLoc" addConf -c "$nginxConfig" "$nginxConfigLoc"
exe ln -s "$nginxConfigLoc" "$nginxConfigEnable" exe ln -s "$nginxConfigLoc" "$nginxConfigEnable"
exe nginx -t exe nginx -t
@@ -238,6 +245,7 @@ step_101() {
exe composer install --no-ansi --no-interaction --no-progress --no-scripts --optimize-autoloader exe composer install --no-ansi --no-interaction --no-progress --no-scripts --optimize-autoloader
exe php artisan config:cache exe php artisan config:cache
exe php artisan route:cache exe php artisan route:cache
exe php artisan view:cache
exe php artisan migrate --force exe php artisan migrate --force
exe php artisan horizon:purge exe php artisan horizon:purge
exe php artisan storage:link exe php artisan storage:link