Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
configuration
Commits
51d6c311
Commit
51d6c311
authored
Sep 23, 2013
by
e0d
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #252 from edx/e0d/universal-scheduler
Changes for universal scheduler and bug fixes.
parents
a87f2d61
d64d173b
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
67 additions
and
19 deletions
+67
-19
playbooks/roles/notifier/defaults/main.yml
+2
-2
playbooks/roles/notifier/handlers/main.yml
+6
-6
playbooks/roles/notifier/tasks/deploy.yml
+2
-2
playbooks/roles/notifier/tasks/main.yml
+17
-3
playbooks/roles/notifier/templates/etc/supervisor/conf.d/notifier-celery-scheduler.conf.j2
+6
-5
playbooks/roles/notifier/templates/etc/supervisor/conf.d/notifier-celery-workers.conf.j2
+1
-1
playbooks/roles/notifier/templates/etc/supervisor/conf.d/notifier-scheduler.conf.j2
+33
-0
No files found.
playbooks/roles/notifier/defaults/main.yml
View file @
51d6c311
...
...
@@ -6,12 +6,12 @@ notifier_home: "/opt/wwc/notifier"
notifier_venv_dir
:
"
{{
notifier_home
}}/virtualenvs/notifier"
notifier_source_repo
:
"
git@github.com:edx/notifier.git"
notifier_code_dir
:
"
{{
notifier_home
}}/src"
notifier_version
:
"
rc/digests
"
notifier_version
:
"
master
"
notifier_git_identity_path
:
"
{{
secure_dir
}}/files/git-identity"
notifier_requirements_file
:
"
{{
notifier_code_dir
}}/requirements.txt"
notifier_log_level
:
"
INFO"
notifier_rsyslog_enabled
:
"
yes"
notifier_digest_task_interval
:
"
5
"
notifier_digest_task_interval
:
"
1440
"
notifier_env
:
"
Development"
...
...
playbooks/roles/notifier/handlers/main.yml
View file @
51d6c311
...
...
@@ -4,20 +4,20 @@
## for future compliance, when the API comes on line.
##
-
name
:
notifier | install notifier-
celery-beat
supervisorctl
:
name=notifier-
celery-beat
state=present
-
name
:
notifier | install notifier-
scheduler
supervisorctl
:
name=notifier-
scheduler
state=present
-
name
:
notifier | install notifier-celery-workers
supervisorctl
:
name=notifier-celery-workers state=present
-
name
:
notifier | restart notifier
supervisorctl
:
name=notifier-
celery-beat
state=restarted
supervisorctl
:
name=notifier-
scheduler
state=restarted
notify
:
-
notifier | install notifier-celery-workers
-
notifier | install notifier-
celery-beat
-
notifier | install notifier-
scheduler
-
name
:
notifier | restart notifier-
celery-beat
supervisorctl
:
name=notifier-
celery-beat
state=restarted
-
name
:
notifier | restart notifier-
scheduler
supervisorctl
:
name=notifier-
scheduler
state=restarted
-
name
:
notifier | restart notifier-celery-workers
supervisorctl
:
name=notifier-celery-workers state=restarted
playbooks/roles/notifier/tasks/deploy.yml
View file @
51d6c311
...
...
@@ -26,8 +26,8 @@
-
install
-
update
-
name
:
notifier | stop notifier-
celery-beat
supervisorctl
:
name=notifier-
celery-beat
state=restarted
-
name
:
notifier | stop notifier-
scheduler
supervisorctl
:
name=notifier-
scheduler
state=restarted
-
name
:
notifier | stop notifier-celery-workers
supervisorctl
:
name=notifier-celery-workers state=restarted
...
...
playbooks/roles/notifier/tasks/main.yml
View file @
51d6c311
...
...
@@ -159,13 +159,26 @@
-
install
-
update
-
name
:
notifier | supervisord config for
celery beat
-
name
:
notifier | supervisord config for
scheduler
template
:
src=etc/supervisor/conf.d/notifier-
celery-beat.conf.j2 dest=/etc/supervisor/conf.d/notifier-celery-beat
.conf
notify
:
notifier | restart notifier-
celery-beat
src=etc/supervisor/conf.d/notifier-
scheduler.conf.j2 dest=/etc/supervisor/conf.d/notifier-scheduler
.conf
notify
:
notifier | restart notifier-
scheduler
tags
:
-
notifier
-
install
-
update
-
name
:
notifier | add cron job
cron
:
name="forums digest" hour={{ notifier_cron_hour }}
minute="{{ notifier_cron_minute }}" job="$HOME/forums_digest.sh 1440"
state="absent"
sudo
:
true
sudo_user
:
"
{{
notifier_user
}}"
tags
:
-
notifier
-
install
-
update
-
clean
-
include
:
deploy.yml
\ No newline at end of file
playbooks/roles/notifier/templates/etc/supervisor/conf.d/notifier-celery-
beat
.conf.j2
→
playbooks/roles/notifier/templates/etc/supervisor/conf.d/notifier-celery-
scheduler
.conf.j2
View file @
51d6c311
;
; {{ ansible_managed }}
;
[program:notifier-
celery-beat
]
[program:notifier-
scheduler
]
command={{ notifier_venv_dir }}/bin/python manage.py
celery beat -l DEBUG
command={{ notifier_venv_dir }}/bin/python manage.py
scheduler
process_name=%(program_name)s
numprocs=1
...
...
@@ -18,15 +18,15 @@ stopsignal=TERM
stopwaitsecs=10
user=notifier
redirect_stderr=false
stdout_logfile={{ notifier_supervisor_log_dest }}/notifier-
celery-beat
-stdout.log
stdout_logfile={{ notifier_supervisor_log_dest }}/notifier-
scheduler
-stdout.log
stdout_logfile_maxbytes=1MB
stdout_logfile_backups=10
stdout_capture_maxbytes=1MB
stderr_logfile={{notifier_supervisor_log_dest }}/notifier-
celery-beat
-stderr.log
stderr_logfile={{notifier_supervisor_log_dest }}/notifier-
scheduler
-stderr.log
stderr_logfile_maxbytes=1MB
stderr_logfile_backups=10
stderr_capture_maxbytes=1MB
environment=PID='/var/tmp/notifier-
celery-beat
.pid',LANG=en_US.UTF-8,
environment=PID='/var/tmp/notifier-
scheduler
.pid',LANG=en_US.UTF-8,
{%- for name,value in notifier_env_vars.items() -%}
{{name}}="{{value}}"{%- if not loop.last -%},{%- endif -%}
{%- endfor -%}
\ No newline at end of file
playbooks/roles/notifier/templates/etc/supervisor/conf.d/notifier-celery-workers.conf.j2
View file @
51d6c311
...
...
@@ -3,7 +3,7 @@
;
[program:notifier-celery-workers]
command={{ notifier_venv_dir }}/bin/python manage.py celery worker -l
DEBUG
command={{ notifier_venv_dir }}/bin/python manage.py celery worker -l
{{ notifier_log_level }}
process_name=%(program_name)s
numprocs=1
...
...
playbooks/roles/notifier/templates/etc/supervisor/conf.d/notifier-scheduler.conf.j2
0 → 100644
View file @
51d6c311
;
; {{ ansible_managed }}
;
[program:notifier-scheduler]
command={{ notifier_venv_dir }}/bin/python manage.py scheduler
process_name=%(program_name)s
numprocs=1
directory={{ notifier_code_dir }}
umask=022
autostart=true
autorestart=true
startsecs=10
startretries=3
exitcodes=0,2
stopsignal=TERM
stopwaitsecs=10
user=notifier
redirect_stderr=false
stdout_logfile={{ notifier_supervisor_log_dest }}/notifier-scheduler-stdout.log
stdout_logfile_maxbytes=1MB
stdout_logfile_backups=10
stdout_capture_maxbytes=1MB
stderr_logfile={{notifier_supervisor_log_dest }}/notifier-scheduler-stderr.log
stderr_logfile_maxbytes=1MB
stderr_logfile_backups=10
stderr_capture_maxbytes=1MB
environment=PID='/var/tmp/notifier-scheduler.pid',LANG=en_US.UTF-8,
{%- for name,value in notifier_env_vars.items() -%}
{{name}}="{{value}}"{%- if not loop.last -%},{%- endif -%}
{%- endfor -%}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment