Skip to content

Commit

Permalink
fix: bypassing 4MB limit for message body
Browse files Browse the repository at this point in the history
  • Loading branch information
proffapt committed Aug 6, 2024
1 parent 6f6a318 commit 7713b0c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions mftp-doctor/mftp-doctor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import time
import docker
import logging
from flask import request
import requests
import argparse
from datetime import datetime
Expand Down Expand Up @@ -52,6 +53,9 @@ def check_error(logs):


def send_notification(logs):
query_params = f"message={logs}"
request_url = f"{TOPIC_URL}?{query_params}"

headers = {
"Priority": "5",
"Tags": "warning,skull,rotating_light,mftp,error",
Expand All @@ -62,8 +66,7 @@ def send_notification(logs):
if EMAIL:
headers["Email"] = EMAIL

response = requests.post(TOPIC_URL, headers=headers,
data=logs)
response = requests.put(request_url, headers=headers)
return response.status_code


Expand Down

0 comments on commit 7713b0c

Please sign in to comment.