Change backup folder depending on DEBUG
This commit is contained in:
parent
301b1603ef
commit
4153f7ed6e
|
@ -2,14 +2,18 @@ from django.core.management.base import BaseCommand, CommandError
|
||||||
from django.utils.timezone import now
|
from django.utils.timezone import now
|
||||||
from django.core.cache import cache
|
from django.core.cache import cache
|
||||||
|
|
||||||
from apiserver import secrets
|
from apiserver import secrets, settings
|
||||||
from apiserver.api import models
|
from apiserver.api import models
|
||||||
|
|
||||||
from uuid import uuid4
|
from uuid import uuid4
|
||||||
import subprocess
|
import subprocess
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
if settings.DEBUG:
|
||||||
|
API_FOLDER = '.'
|
||||||
|
DATA_FOLDER = './data'
|
||||||
|
BACKUP_FOLDER = './backups'
|
||||||
|
else:
|
||||||
API_FOLDER = '/opt/spaceport/apiserver'
|
API_FOLDER = '/opt/spaceport/apiserver'
|
||||||
DATA_FOLDER = '/opt/spaceport/apiserver/data'
|
DATA_FOLDER = '/opt/spaceport/apiserver/data'
|
||||||
BACKUP_FOLDER = '/opt/spaceport/apiserver/backups'
|
BACKUP_FOLDER = '/opt/spaceport/apiserver/backups'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user