Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialize CachedData cache for distributor customlist searches. (PP-1045) #1715

Merged
merged 1 commit into from
Mar 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions bin/custom_list_update_new_entries
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ import sys
bin_dir = os.path.split(__file__)[0]
package_dir = os.path.join(bin_dir, "..")
sys.path.append(os.path.abspath(package_dir))

from core.model import production_session
from core.scripts import CustomListUpdateEntriesScript
from core.util.cache import CachedData

# The cache needs to be initialized for this script to work properly.
CachedData.initialize(production_session(initialize_data=False))
CustomListUpdateEntriesScript().run()