yes2
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Pünkösd Marcell 2021-07-22 17:54:33 +02:00
parent 00444d699c
commit d9e05538fe

View File

@ -28,14 +28,14 @@ DEVICE_ID = os.environ.get("DEVICE_ID", "devraspi")
MQTT_USERNAME = "birbnetes" MQTT_USERNAME = "birbnetes"
MQTT_PASSWORD = "de4d2182" MQTT_PASSWORD = "de4d2182"
MQTT_HOSTNAME = "mqtt.kmlabz.com" MQTT_HOSTNAME = "10.6.6.7"
MQTT_PORT = 1883 MQTT_PORT = 1884
STARTTIME = time.time() STARTTIME = time.time()
ENDTIME = time.time() ENDTIME = time.time()
URL = "https://birb.k8s.kmlabz.com/sample" URL = "http://10.6.6.7:8071/sample"
FILE = 'CommonStarling_100962.wav' FILE = 'wwBVaeBZJteIXroQYRTPTUyEOXqH7C.positive.wav'
sentry_logging = LoggingIntegration( sentry_logging = LoggingIntegration(
level=logging.INFO, level=logging.INFO,
@ -63,7 +63,8 @@ def mqtt_on_connect(client, userdata, flags, rc):
os.path.basename(FILE), open(FILE, 'rb').read(), 'audio/wave', {'Content-length': os.path.getsize(FILE)}), os.path.basename(FILE), open(FILE, 'rb').read(), 'audio/wave', {'Content-length': os.path.getsize(FILE)}),
"description": (None, json.dumps({'date': datetime.now().isoformat(), 'device_id': '10'}), "application/json") "description": (None, json.dumps({'date': datetime.now().isoformat(), 'device_id': '10'}), "application/json")
} }
requests.post(URL, files=files) r = requests.post(URL, files=files)
logging.info(f"Upload complete: {r.status_code}")
STARTTIME = time.time() STARTTIME = time.time()