mirror of
https://github.com/bb-Ricardo/netbox-sync.git
synced 2026-01-21 00:10:25 -06:00
adds config option to define where the cache files should be stored #254
This commit is contained in:
@@ -49,6 +49,7 @@ class NetBoxHandler:
|
||||
"timeout": 30,
|
||||
"max_retry_attempts": 4,
|
||||
"use_caching": True,
|
||||
"cache_directory_location": "cache",
|
||||
"ignore_unknown_source_object_pruning": False
|
||||
}
|
||||
|
||||
@@ -126,7 +127,7 @@ class NetBoxHandler:
|
||||
if self.use_caching is False:
|
||||
return
|
||||
|
||||
cache_folder_name = "cache"
|
||||
cache_folder_name = self.cache_directory_location
|
||||
|
||||
base_dir = os.sep.join(__file__.split(os.sep)[0:-3])
|
||||
if cache_folder_name[0] != os.sep:
|
||||
|
||||
@@ -102,6 +102,9 @@ host_fqdn = netbox.example.com
|
||||
# dependencies occur, switching off caching might help.
|
||||
#use_caching = true
|
||||
|
||||
# The location of the directory where the cache files should be stored
|
||||
#cache_directory_location = cache
|
||||
|
||||
###
|
||||
### [sources/*]
|
||||
###
|
||||
|
||||
Reference in New Issue
Block a user