This commit is contained in:
parent
00444d699c
commit
d9e05538fe
11
benchmark.py
11
benchmark.py
@ -28,14 +28,14 @@ DEVICE_ID = os.environ.get("DEVICE_ID", "devraspi")
|
||||
|
||||
MQTT_USERNAME = "birbnetes"
|
||||
MQTT_PASSWORD = "de4d2182"
|
||||
MQTT_HOSTNAME = "mqtt.kmlabz.com"
|
||||
MQTT_PORT = 1883
|
||||
MQTT_HOSTNAME = "10.6.6.7"
|
||||
MQTT_PORT = 1884
|
||||
|
||||
STARTTIME = time.time()
|
||||
ENDTIME = time.time()
|
||||
|
||||
URL = "https://birb.k8s.kmlabz.com/sample"
|
||||
FILE = 'CommonStarling_100962.wav'
|
||||
URL = "http://10.6.6.7:8071/sample"
|
||||
FILE = 'wwBVaeBZJteIXroQYRTPTUyEOXqH7C.positive.wav'
|
||||
|
||||
sentry_logging = LoggingIntegration(
|
||||
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)}),
|
||||
"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()
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user