Cleanup, add helper for external caching
This commit is contained in:
parent
67643482c8
commit
56ad72148b
4 changed files with 44 additions and 13 deletions
12
config.py
12
config.py
|
@ -1,3 +1,4 @@
|
|||
import subprocess
|
||||
import os
|
||||
import yaml
|
||||
from pymongo import MongoClient
|
||||
|
@ -7,8 +8,17 @@ from utils.key import Key
|
|||
from utils.actor_service import ActorService
|
||||
from utils.object_service import ObjectService
|
||||
|
||||
def noop():
|
||||
pass
|
||||
|
||||
VERSION = '1.0.0'
|
||||
|
||||
CUSTOM_CACHE_HOOKS = False
|
||||
try:
|
||||
from cache_hooks import purge as custom_cache_purge_hook
|
||||
except ModuleNotFoundError:
|
||||
custom_cache_purge_hook = noop
|
||||
|
||||
VERSION = subprocess.check_output(['git', 'describe', '--always']).split()[0].decode('utf-8')
|
||||
|
||||
CTX_AS = 'https://www.w3.org/ns/activitystreams'
|
||||
CTX_SECURITY = 'https://w3id.org/security/v1'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue