mirror of
https://github.com/YunoHost-Apps/weblate_ynh.git
synced 2024-10-01 13:35:04 +02:00
Improve cron file
This commit is contained in:
parent
d942065f6a
commit
5e78b6e62e
3 changed files with 11 additions and 3 deletions
|
@ -1,9 +1,9 @@
|
|||
# https://docs.weblate.org/en/latest/admin/install.html#production-cron
|
||||
# Fulltext index updates
|
||||
*/5 * * * * weblate DJANGO_SETTINGS_MODULE="weblate.settings" __FINALPATH__/venv/bin/weblate update_index
|
||||
*/5 * * * * __APP__ export DJANGO_SETTINGS_MODULE="weblate.settings" && cd __FINALPATH__ && venv/bin/weblate update_index
|
||||
|
||||
# Cleanup stale objects
|
||||
@daily weblate DJANGO_SETTINGS_MODULE="weblate.settings" __FINALPATH__/venv/bin/weblate cleanuptrans
|
||||
@daily __APP__ export DJANGO_SETTINGS_MODULE="weblate.settings" && cd __FINALPATH__ && venv/bin/weblate cleanuptrans
|
||||
|
||||
# Commit pending changes after 96 hours
|
||||
@hourly weblate DJANGO_SETTINGS_MODULE="weblate.settings" __FINALPATH__/venv/bin/weblate commit_pending --all --age=96 --verbosity=0
|
||||
@hourly __APP__ export DJANGO_SETTINGS_MODULE="weblate.settings" && cd __FINALPATH__ && venv/bin/weblate commit_pending --all --age=96 --verbosity=0
|
||||
|
|
|
@ -239,6 +239,7 @@ ynh_app_setting_set "$app" memc_port "$memc_port"
|
|||
# SETUP CRON
|
||||
#=================================================
|
||||
cp ../conf/cron "/etc/cron.d/$app"
|
||||
ynh_replace_string "__APP__" "$app" "/etc/cron.d/$app"
|
||||
ynh_replace_string "__FINALPATH__" "$final_path/" "/etc/cron.d/$app"
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -270,6 +270,13 @@ fi
|
|||
# Recalculate and store the config file checksum into the app settings
|
||||
ynh_store_file_checksum "$final_path/venv/lib/python2.7/site-packages/weblate/settings.py"
|
||||
|
||||
#=================================================
|
||||
# SETUP CRON
|
||||
#=================================================
|
||||
cp ../conf/cron "/etc/cron.d/$app"
|
||||
ynh_replace_string "__APP__" "$app" "/etc/cron.d/$app"
|
||||
ynh_replace_string "__FINALPATH__" "$final_path/" "/etc/cron.d/$app"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue