Skip to content

Commit

Permalink
[Hardening] Make sure we don't stuck on "collectstatic" task
Browse files Browse the repository at this point in the history
  • Loading branch information
afabiani committed Mar 28, 2022
1 parent 6fd8295 commit ffaf018
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,12 @@ def migrations(ctx):
@task
def statics(ctx):
print("**************************statics*******************************")
ctx.run('mkdir -p /mnt/volumes/statics/{static,uploads}')
ctx.run(f"python manage.py collectstatic --noinput --settings={_localsettings()}", pty=True)
try:
ctx.run('mkdir -p /mnt/volumes/statics/{static,uploads}')
ctx.run(f"python manage.py collectstatic --noinput --settings={_localsettings()}", pty=True)
except Exception:
import traceback
traceback.print_exc()


@task
Expand Down

0 comments on commit ffaf018

Please sign in to comment.