Increase buffer
This commit is contained in:
parent
b2ad9369ac
commit
d9de230b24
7
main.py
7
main.py
|
@ -1,6 +1,6 @@
|
||||||
import os
|
import os, sys
|
||||||
import logging
|
import logging
|
||||||
logging.basicConfig(
|
logging.basicConfig(stream=sys.stdout,
|
||||||
format='[%(asctime)s] %(levelname)s %(module)s/%(funcName)s - %(message)s',
|
format='[%(asctime)s] %(levelname)s %(module)s/%(funcName)s - %(message)s',
|
||||||
level=logging.DEBUG if os.environ.get('DEBUG') else logging.INFO)
|
level=logging.DEBUG if os.environ.get('DEBUG') else logging.INFO)
|
||||||
|
|
||||||
|
@ -49,7 +49,8 @@ if __name__ == '__main__':
|
||||||
logging.info('==========================')
|
logging.info('==========================')
|
||||||
logging.info('Booting up...')
|
logging.info('Booting up...')
|
||||||
pygame.init()
|
pygame.init()
|
||||||
pygame.mixer.init(buffer=1024)
|
pygame.mixer.pre_init(buffer=4096)
|
||||||
|
pygame.mixer.init(buffer=4096)
|
||||||
|
|
||||||
client = EzvizClient(secrets.EZVIZ_EMAIL, secrets.EZVIZ_PASS, 'apiius.ezvizlife.com')
|
client = EzvizClient(secrets.EZVIZ_EMAIL, secrets.EZVIZ_PASS, 'apiius.ezvizlife.com')
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -35,7 +35,7 @@ def on_connect(client, userdata, flags, return_code):
|
||||||
"""On MQTT connect."""
|
"""On MQTT connect."""
|
||||||
# pylint: disable=unused-argument
|
# pylint: disable=unused-argument
|
||||||
if return_code == 0:
|
if return_code == 0:
|
||||||
logging.info("connected OK Returned code=%s", return_code)
|
logging.debug("connected OK Returned code=%s", return_code)
|
||||||
else:
|
else:
|
||||||
logging.info("Bad connection Returned code=%s", return_code)
|
logging.info("Bad connection Returned code=%s", return_code)
|
||||||
client.reconnect()
|
client.reconnect()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user