Skip to content

Commit

Permalink
Implement simple heartbeat endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
BAntonellini committed Sep 6, 2023
1 parent ae9f7f8 commit bae320a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dbti.py
Original file line number Diff line number Diff line change
Expand Up @@ -2057,7 +2057,7 @@ def health_check(runners):
if not project_runner:response.status=400;return asdict(ServerErrorContainer(error=ServerError(code=ServerErrorCode.ProjectNotRegistered,message=_b,data={_c:runners.registered_projects()})))
return{'result':{'status':'ready','project_name':project_runner.config.project_name,'target_name':project_runner.config.target_name,'profile_name':project_runner.config.project_name,'logs':project_runner.config.log_path,_AB:str(datetime.utcnow()),_n:_A},'id':str(uuid.uuid4()),_AS:__name__}
@route(["/heartbeat", "/api/heartbeat"], methods=_S)
def heart_beat():
def heart_beat(runners):
"""Heart beat endpoint.""";return {"result": {"status":"ready"}}
ServerPlugin=DbtInterfaceServerPlugin()
install(ServerPlugin)
Expand Down
2 changes: 1 addition & 1 deletion src/dbt_core_interface/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -6151,7 +6151,7 @@ def health_check(runners: DbtProjectContainer) -> dict:


@route(["/heartbeat", "/api/heartbeat"], methods="GET")
def heart_beat() -> dict:
def heart_beat(runners: DbtProjectContainer) -> dict:
"""Heart beat endpoint."""
return {"result": {"status": "ready"}}

Expand Down

0 comments on commit bae320a

Please sign in to comment.