Skip to content

Commit

Permalink
fix: adjust scheduled tasks
Browse files Browse the repository at this point in the history
- use full path to /usr/sbin/autopostgresqlbackup
- set django settings to production before backup tasks
  • Loading branch information
alee committed Mar 25, 2024
1 parent f6c7ae4 commit e6ec428
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion django/curator/invoke_tasks/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def create_pgpass_file(ctx, db_key=_DEFAULT_DATABASE, force=False):
@task(aliases=["b"])
def backup(ctx):
create_pgpass_file(ctx)
ctx.run("autopostgresqlbackup")
ctx.run("/usr/sbin/autopostgresqlbackup")


@task(aliases=["r"])
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion django/deploy/db/postgresql-backup-pre
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/sh

/usr/local/bin/inv -r /code db.pgpass >> /shared/logs/db-backup.log 2>&1
export DJANGO_SETTINGS_MODULE="core.settings.production"
/usr/local/bin/inv -r /code db.pgpass >> /shared/logs/prepare-db-backup.log 2>&1

0 comments on commit e6ec428

Please sign in to comment.