Use cronic to make cron jobs less noisy
This commit is contained in:
parent
d11767cbf4
commit
50cfcb7683
2 changed files with 3 additions and 3 deletions
|
@ -7,9 +7,9 @@ source {{ env.project_dir }}/env
|
|||
# PYTHONPATH variable is not preserved by sudo.
|
||||
|
||||
# Clear out expired Django sessions.
|
||||
sudo --user={{ env.app_user }} --preserve-env PYTHONPATH={{ env.project_dir }}:$PYTHONPATH {{ env.virtualenv }}/bin/django-admin clearsessions
|
||||
cronic sudo --user={{ env.app_user }} --preserve-env PYTHONPATH={{ env.project_dir }}:$PYTHONPATH {{ env.virtualenv }}/bin/django-admin clearsessions
|
||||
|
||||
sudo --user={{ env.app_user }} --preserve-env PYTHONPATH={{ env.project_dir }}:$PYTHONPATH {{ env.virtualenv }}/bin/django-admin expunge_deleted
|
||||
cronic sudo --user={{ env.app_user }} --preserve-env PYTHONPATH={{ env.project_dir }}:$PYTHONPATH {{ env.virtualenv }}/bin/django-admin expunge_deleted
|
||||
|
||||
|
||||
# Local Variables:
|
||||
|
|
2
fabfile.py
vendored
2
fabfile.py
vendored
|
@ -19,7 +19,7 @@ hosts = os.environ['FABRIC_HOSTS'].split(',')
|
|||
|
||||
def install_essentials(c):
|
||||
# ImageMagick (convert) and Inkscape required for generating badges.
|
||||
c.run('sudo apt-get install -yy git python3-dev python3-venv python3-wheel build-essential python3-cairocffi python3-psycopg2 postgresql uwsgi-emperor uwsgi-plugin-python3 memcached netcat nginx certbot libmemcached-dev xmlsec1 imagemagick inkscape')
|
||||
c.run('sudo apt-get install -yy git python3-dev python3-venv python3-wheel build-essential python3-cairocffi python3-psycopg2 postgresql uwsgi-emperor uwsgi-plugin-python3 memcached netcat nginx certbot libmemcached-dev xmlsec1 imagemagick inkscape cronic')
|
||||
|
||||
|
||||
@task(hosts=hosts)
|
||||
|
|
Loading…
Reference in a new issue