Skip to content
Snippets Groups Projects
Commit 958766e6 authored by Vermaat's avatar Vermaat
Browse files

Don't create some temp dirs on every run

parent ba9a6a5c
No related branches found
No related tags found
No related merge requests found
...@@ -4,11 +4,6 @@ pointed-to by the `MUTALYZER_SETTINGS` environment variable. ...@@ -4,11 +4,6 @@ pointed-to by the `MUTALYZER_SETTINGS` environment variable.
""" """
# Todo: Find an alternative to the temporary directories/files defined here,
# since they are created even if the setting is reset from another
# configuration file, and they are never removed.
# Use Mutalyzer in debug mode. # Use Mutalyzer in debug mode.
DEBUG = False DEBUG = False
...@@ -22,8 +17,7 @@ EMAIL = 'mutalyzer@humgen.nl' ...@@ -22,8 +17,7 @@ EMAIL = 'mutalyzer@humgen.nl'
# The cache directory. Used to store uploaded and downloaded files (e.g., # The cache directory. Used to store uploaded and downloaded files (e.g.,
# reference files from NCBI or user) and batch job results. # reference files from NCBI or user) and batch job results.
import tempfile CACHE_DIR = '/tmp'
CACHE_DIR = tempfile.mkdtemp()
# Maximum size of the cache directory (in bytes). # Maximum size of the cache directory (in bytes).
MAX_CACHE_SIZE = 50 * 1048576 # 50 MB MAX_CACHE_SIZE = 50 * 1048576 # 50 MB
...@@ -42,11 +36,7 @@ DATABASE_URI = 'sqlite://' ...@@ -42,11 +36,7 @@ DATABASE_URI = 'sqlite://'
DEFAULT_ASSEMBLY = 'hg19' DEFAULT_ASSEMBLY = 'hg19'
# Name and location of the log file. # Name and location of the log file.
import os LOG_FILE = '/tmp/mutalyzer.log'
import tempfile
log_handle, log_filename = tempfile.mkstemp()
os.close(log_handle)
LOG_FILE = log_filename
# Level of logged messages. # Level of logged messages.
LOG_LEVEL = 3 LOG_LEVEL = 3
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment