Skip to content

Commit

Permalink
[FIX] argocd_website: Fix to use domain based on applications config …
Browse files Browse the repository at this point in the history
…file for checking status
  • Loading branch information
ByteMeAsap committed Apr 16, 2024
1 parent e155b85 commit 5a11ff9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion argocd_website/models/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
from datetime import timedelta

import requests
import yaml
from yaml import Loader

from odoo import _, fields, models
from odoo.exceptions import MissingError, ValidationError
Expand Down Expand Up @@ -30,7 +32,9 @@ def _compute_access_url(self):
def check_health(self):
self.ensure_one()
try:
res = requests.get("https://" + self.domain)
config = yaml.load(self.config, Loader=Loader)
helm = yaml.load(config["helm"], Loader=Loader)
res = requests.get("https://%s" % self._get_domain(helm))
except Exception:
return False
return res.ok
Expand Down

0 comments on commit 5a11ff9

Please sign in to comment.