Skip to content

Commit

Permalink
move the cache folder
Browse files Browse the repository at this point in the history
  • Loading branch information
devowit committed Aug 17, 2020
1 parent 5ba804d commit a8853b3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions backend/app_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
# sys.path.append(BASEDIR) #when running migrate, needed to not get import errors

UPLOAD_FOLDER = os.path.join(DATADIR, "storage")
CACHE_FOLDER=os.path.join(DATADIR, "cache")
DOWNLOAD_FOLDER = os.path.join(BASEDIR, "downloads")

app = Flask(__name__, static_folder=None)
Expand Down
4 changes: 2 additions & 2 deletions backend/t2wml_web.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from t2wml.api import Sheet, KnowledgeGraph, Wikifier, WikifierService, t2wml_settings
from t2wml.spreadsheets.conversions import column_index_to_letter, to_excel, column_letter_to_index
from caching import CacheHolder
from app_config import db, UPLOAD_FOLDER
from app_config import db, UPLOAD_FOLDER, CACHE_FOLDER
from wikidata_models import DatabaseProvider
from utils import get_labels_and_descriptions

Expand All @@ -22,7 +22,7 @@ def update_t2wml_settings(project):
t2wml_settings.sparql_endpoint=project.sparql_endpoint
t2wml_settings.wikidata_provider = DatabaseProvider(project.sparql_endpoint)
t2wml_settings.cache_data_files = True
t2wml_settings.cache_data_files_folder = os.path.join(UPLOAD_FOLDER, "data_cache")
t2wml_settings.cache_data_files_folder = CACHE_FOLDER


def get_wikifier(project):
Expand Down

0 comments on commit a8853b3

Please # to comment.