Merge remote-tracking branch 'origin/api-v1.8.2' into dev
This commit is contained in:
commit
ae4e4dc3fc
4 changed files with 5 additions and 3 deletions
|
|
@ -196,7 +196,7 @@ def process():
|
|||
cur.execute(query)
|
||||
result = cur.fetchone()
|
||||
if result["valid"]:
|
||||
logging.info("Valid alert, notifying users, alertId:{alert['alertId']} name: {alert['name']}")
|
||||
logging.info(f"Valid alert, notifying users, alertId:{alert['alertId']} name: {alert['name']}")
|
||||
notifications.append(generate_notification(alert, result))
|
||||
except Exception as e:
|
||||
logging.error(f"!!!Error while running alert query for alertId:{alert['alertId']} name: {alert['name']}")
|
||||
|
|
|
|||
|
|
@ -99,7 +99,8 @@ class Slack:
|
|||
url=integration["endpoint"],
|
||||
json={"attachments": attachments[i:i + 100]})
|
||||
if r.status_code != 200:
|
||||
print("!!!! something went wrong")
|
||||
print("!!!! something went wrong while sending to:")
|
||||
print(integration)
|
||||
print(r)
|
||||
print(r.text)
|
||||
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ def process():
|
|||
cur.execute(query)
|
||||
result = cur.fetchone()
|
||||
if result["valid"]:
|
||||
logging.info("Valid alert, notifying users, alertId:{alert['alertId']} name: {alert['name']}")
|
||||
logging.info(f"Valid alert, notifying users, alertId:{alert['alertId']} name: {alert['name']}")
|
||||
notifications.append(generate_notification(alert, result))
|
||||
except Exception as e:
|
||||
logging.error(f"!!!Error while running alert query for alertId:{alert['alertId']} name: {alert['name']}")
|
||||
|
|
|
|||
|
|
@ -294,6 +294,7 @@ def search_sessions(data: schemas.SessionsSearchPayloadSchema, project_id, user_
|
|||
sessions = cur.execute(main_query)
|
||||
except Exception as err:
|
||||
print("--------- SESSIONS-CH SEARCH QUERY EXCEPTION -----------")
|
||||
print(main_query)
|
||||
print("--------- PAYLOAD -----------")
|
||||
print(data.json())
|
||||
print("--------------------")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue