mirror of
https://github.com/ianarawjo/ChainForge.git
synced 2025-03-14 16:26:45 +00:00
Create cache dir upon importCache
This commit is contained in:
parent
b0d8dac516
commit
51bb8dbd3a
@ -231,6 +231,9 @@ def reduce_responses(responses: list, vars: list) -> list:
|
||||
return ret
|
||||
|
||||
def load_all_cached_responses(cache_ids):
|
||||
# Create a cache dir if it doesn't exist:
|
||||
create_dir_if_not_exists(CACHE_DIR)
|
||||
|
||||
if not isinstance(cache_ids, list):
|
||||
cache_ids = [cache_ids]
|
||||
|
||||
@ -703,6 +706,9 @@ def importCache():
|
||||
typeof_files = data['files']
|
||||
return jsonify({'result': False, 'error': f'Files parameter in importData should be a dict, but is of type {typeof_files}.'})
|
||||
|
||||
# Create a cache dir if it doesn't exist:
|
||||
create_dir_if_not_exists(CACHE_DIR)
|
||||
|
||||
# Verify filenames, data, and access permissions to write to cache
|
||||
for filename in data['files']:
|
||||
# Verify filepath
|
||||
|
Loading…
x
Reference in New Issue
Block a user