Skip to content

Commit

Permalink
Merge branch 'dev' into nadia-label-poc
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaacMilarky committed Mar 12, 2024
2 parents 55b9a2e + a338ef7 commit 31b42c7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions augur/api/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@


from augur.application.logs import AugurLogger
from augur.application.db.lib import get_value
from augur.application.db.session import DatabaseSession
from augur.application.db import get_engine
from augur.application.config import AugurConfig
from augur.application.db.engine import get_database_string, create_database_engine
from metadata import __version__ as augur_code_version
from augur.application.db.models import Repo, Issue, PullRequest, Message, PullRequestReview, Commit, IssueAssignee, PullRequestAssignee, PullRequestCommit, PullRequestFile, Contributor, IssueLabel, PullRequestLabel, ContributorsAlias, Release, ClientApplication

from metadata import __version__ as augur_code_version



# from augur.api.routes import AUGUR_API_VERSION
AUGUR_API_VERSION = "api/unstable"
Expand Down Expand Up @@ -318,7 +319,7 @@ def get_server_cache(cache_manager) -> Cache:
server cache
"""

expire = int(get_value('Server', 'cache_expire'))
expire = int(augur_config.get_value('Server', 'cache_expire'))
server_cache = cache_manager.get_cache('server', expire=expire)
server_cache.clear()

Expand All @@ -329,6 +330,7 @@ def get_server_cache(cache_manager) -> Cache:
url = get_database_string()
engine = create_database_engine(url, poolclass=StaticPool)
db_session = DatabaseSession(logger, engine)
augur_config = AugurConfig(logger, db_session)


def get_connection(table, cursor_field_name, connection_class, after, limit, extra_condition=False):
Expand Down

0 comments on commit 31b42c7

Please sign in to comment.