Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,20 @@ def init_logging():


def sync_before_server_start():
try:
update_holmes_status_in_db(dal, config)
except Exception:
logging.error("Failed to update holmes status", exc_info=True)
try:
holmes_sync_toolsets_status(dal, config)
except Exception:
logging.error("Failed to synchronise holmes toolsets", exc_info=True)
# Only sync with Robusta platform if we have a token and cluster name configured
if dal.enabled and config.cluster_name:
try:
update_holmes_status_in_db(dal, config)
except Exception:
logging.error("Failed to update holmes status", exc_info=True)
try:
holmes_sync_toolsets_status(dal, config)
except Exception:
logging.error("Failed to synchronise holmes toolsets", exc_info=True)
else:
logging.debug(
"Skipping Robusta platform sync - no token or cluster name configured"
)


if ENABLE_TELEMETRY and SENTRY_DSN:
Expand All @@ -107,7 +113,7 @@ def sync_before_server_start():
)
sentry_sdk.set_tags(
{
"account_id": dal.account_id,
"account_id": dal.account_id if dal.enabled else None,
"cluster_name": config.cluster_name,
"version": get_version(),
"environment": environment,
Expand Down
Loading