Skip to content

Commit 00461d2

Browse files
[CI] Make advisor setup repository
To avoid very high latency on the first request.
1 parent 7a97518 commit 00461d2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

premerge/advisor/advisor.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from flask import Flask
55

66
import advisor_lib
7+
import git_utils
78

89
advisor_blueprint = flask.Blueprint("advisor", __name__)
910

@@ -39,6 +40,7 @@ def create_app(db_path: str, repository_path: str):
3940
app = Flask(__name__)
4041
app.register_blueprint(advisor_blueprint)
4142
app.teardown_appcontext(_close_db)
43+
git_utils.clone_repository_if_not_present(repository_path)
4244
with app.app_context():
4345
app.config["DB_PATH"] = db_path
4446
app.config["REPO_PATH"] = repository_path

0 commit comments

Comments
 (0)