Change backup folder depending on DEBUG

This commit is contained in:
Tanner Collin 2020-03-08 01:10:03 +00:00
parent 301b1603ef
commit 4153f7ed6e

View File

@ -2,14 +2,18 @@ from django.core.management.base import BaseCommand, CommandError
from django.utils.timezone import now
from django.core.cache import cache
from apiserver import secrets
from apiserver import secrets, settings
from apiserver.api import models
from uuid import uuid4
import subprocess
import time
if settings.DEBUG:
API_FOLDER = '.'
DATA_FOLDER = './data'
BACKUP_FOLDER = './backups'
else:
API_FOLDER = '/opt/spaceport/apiserver'
DATA_FOLDER = '/opt/spaceport/apiserver/data'
BACKUP_FOLDER = '/opt/spaceport/apiserver/backups'