Skip to content
This repository has been archived by the owner on Jul 24, 2018. It is now read-only.

Commit

Permalink
Initialize the cache at startup.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphbean committed Jan 16, 2015
1 parent fc80661 commit e9d5cdc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion fmn/consumer/consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,12 @@ def __init__(self, *args, **kwargs):
log.debug("Loading rules from fmn.rules")
self.valid_paths = fmn.lib.load_rules(root="fmn.rules")

self.cached_preferences = None
# Initialize our in-memory cache of the FMN preferences database
self.cached_preferences_lock = threading.Lock()
self.cached_preferences = None
session = self.make_session()
self.refresh_cache(session)
session.close()

log.debug("FMNConsumer initialized")

Expand Down

0 comments on commit e9d5cdc

Please sign in to comment.