-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: move job runner to /etc/cron.d; improve elastic-rebuild
- Loading branch information
1 parent
6b69ef7
commit 9a33243
Showing
5 changed files
with
107 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# {{ ansible_managed }} | ||
# | ||
# crontab for meza run-jobs and custom-crons for environment "{{ env }}" | ||
SHELL=/bin/bash | ||
PATH=/sbin:/bin:/usr/sbin:/usr/bin | ||
MAILTO=root | ||
|
||
{% if inventory_hostname in groups['app_servers'] %} | ||
# | ||
# Run a small set of jobs across all wikis periodically | ||
# | ||
# run_jobs_freq_maxtime run_jobs_freq_totalmaxtime run_jobs_freq_maxjobs run_jobs_freq_maxload | ||
{{ run_jobs_freq_crontime }} root WIKI={{ list_of_wikis[0] }} php {{ m_deploy }}/runAllJobs.php {{ run_jobs_freq_maxtime }} {{ run_jobs_freq_totalmaxtime }} {{ run_jobs_freq_maxjobs }} {{ run_jobs_freq_maxload }} >> {{ m_logs }}/jobqueue/cron_runAllJobs_`date "+\%Y\%m\%d"`.log 2>&1 | ||
|
||
# | ||
# Run all jobs on all wikis | ||
# Note: WIKI=<wiki_id> does not matter which wiki. Just needs one to load | ||
# settings. | ||
# | ||
{{ run_all_jobs_crontime }} root WIKI={{ list_of_wikis[0] }} php {{ m_deploy }}/runAllJobs.php >> {{ m_logs }}/jobqueue/cron_runAllJobs_`date "+\%Y\%m\%d"`.log 2>&1 | ||
|
||
{% endif %} | ||
|
||
{% if inventory_hostname in groups['app_servers'] %} | ||
# | ||
# Clean out uploads temporary files nightly | ||
# | ||
{{ clean_upload_stash_crontime }} root meza maint cleanuploadstash {{ env }} >> {{ m_logs }}/cleanup/uploadstash_`date "+\%Y-\%m"`.log 2>&1 | ||
|
||
{% endif %} | ||
|
||
{% if custom_crons is defined %} | ||
# | ||
# The following jobs are custom definitions from this meza-instance's config | ||
# | ||
{% for cron in custom_crons %}{% if inventory_hostname in groups[cron.server_type] %} | ||
{{ cron.time }} root {{ cron.job }} | ||
|
||
{% endif %}{% endfor %} | ||
|
||
# END custom crons | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters