check the valid thru field for content folder to decide if it needs a refresh
This commit is contained in:
parent
d43c0353d2
commit
99bca983a9
@ -21,7 +21,7 @@ class ContentService:
|
|||||||
ContentFolderDoc.region == region
|
ContentFolderDoc.region == region
|
||||||
)
|
)
|
||||||
|
|
||||||
if folder is None:
|
if folder is None or folder.valid_thru.replace(tzinfo=timezone.utc) < datetime.now(timezone.utc):
|
||||||
await ContentSharePointManager().retrieve_directories_for_folder(folder_name=folder_name, region=region)
|
await ContentSharePointManager().retrieve_directories_for_folder(folder_name=folder_name, region=region)
|
||||||
|
|
||||||
folder = await ContentFolderDoc.find_one(
|
folder = await ContentFolderDoc.find_one(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user