titilambert / pyhydroquebec

DEPRECATED - Get your consumption data from your HydroQuebec account (www.hydroquebec.com)
Apache License 2.0
94 stars 44 forks source link

Threads seem to multiply with each execution #65

Open lucboudreau opened 3 years ago

lucboudreau commented 3 years ago

Describe the bug

I've been getting crashes for a while. In the pyhydroquebec logs, the log entries seem to be copied 2, then 3, then 4 times and so one until the docker image crashes and restarts.

To Reproduce

I run pyhydroquebec in docker as described here.

https://github.com/titilambert/pyhydroquebec/issues/49#issuecomment-658409017

Expected behavior Shouldn't crash repeatedly :)

This is what I get in my logs.

2021-02-20 20:50:49,640 - INFO - mqtt-hydroquebec - Initializing...
2021-02-20 20:50:49,642 - INFO - mqtt-hydroquebec - Start main process
2021-02-20 20:50:49,642 - INFO - mqtt-hydroquebec - Connecting to MQTT server
2021-02-20 20:50:49,642 - INFO - mqtt-hydroquebec - Reaching MQTT server
2021-02-20 20:50:49,643 - INFO - pyhydroquebec - Log in using user@example.com
2021-02-20 20:50:52,569 - INFO - pyhydroquebec - fetching customers
2021-02-20 20:50:52,725 - INFO - pyhydroquebec.customer.0123456789 - Fetching summary page
2021-02-20 20:50:52,725 - INFO - pyhydroquebec - Selecting customer 0123456789
2021-02-20 20:50:59,687 - INFO - pyhydroquebec - Customer 0123456789 selected
2021-02-20 20:51:05,174 - INFO - pyhydroquebec.customer.0123456789 - Fetching current period data
2021-02-20 20:51:09,500 - INFO - pyhydroquebec.customer.0123456789 - Fetching daily data between 2021-02-19 and 2021-02-19
2021-02-20 20:51:09,561 - INFO - mqtt-hydroquebec - Waiting for 10800 seconds before the next check
2021-02-20 23:51:26,086 - INFO - pyhydroquebec - Log in using user@example.com
2021-02-20 23:51:26,086 - INFO - pyhydroquebec - Log in using user@example.com
2021-02-20 23:51:28,234 - INFO - pyhydroquebec - fetching customers
2021-02-20 23:51:28,234 - INFO - pyhydroquebec - fetching customers
2021-02-20 23:51:29,318 - INFO - pyhydroquebec.customer.0123456789 - Fetching summary page
2021-02-20 23:51:29,318 - INFO - pyhydroquebec.customer.0123456789 - Fetching summary page
2021-02-20 23:51:29,318 - INFO - pyhydroquebec - Selecting customer 0123456789
2021-02-20 23:51:29,318 - INFO - pyhydroquebec - Selecting customer 0123456789
2021-02-20 23:51:42,850 - INFO - pyhydroquebec - Customer 0123456789 selected
2021-02-20 23:51:42,850 - INFO - pyhydroquebec - Customer 0123456789 selected
2021-02-20 23:51:51,807 - INFO - pyhydroquebec.customer.0123456789 - Fetching current period data
2021-02-20 23:51:51,807 - INFO - pyhydroquebec.customer.0123456789 - Fetching current period data
2021-02-20 23:51:57,261 - INFO - pyhydroquebec.customer.0123456789 - Fetching daily data between 2021-02-19 and 2021-02-19
2021-02-20 23:51:57,261 - INFO - pyhydroquebec.customer.0123456789 - Fetching daily data between 2021-02-19 and 2021-02-19
2021-02-20 23:51:57,309 - INFO - mqtt-hydroquebec - Waiting for 10800 seconds before the next check
2021-02-21 02:52:14,064 - INFO - pyhydroquebec - Log in using user@example.com
2021-02-21 02:52:14,064 - INFO - pyhydroquebec - Log in using user@example.com
2021-02-21 02:52:14,064 - INFO - pyhydroquebec - Log in using user@example.com
2021-02-21 02:52:16,599 - INFO - pyhydroquebec - fetching customers
2021-02-21 02:52:16,599 - INFO - pyhydroquebec - fetching customers
2021-02-21 02:52:16,599 - INFO - pyhydroquebec - fetching customers
2021-02-21 02:52:16,768 - INFO - pyhydroquebec.customer.0123456789 - Fetching summary page
2021-02-21 02:52:16,768 - INFO - pyhydroquebec.customer.0123456789 - Fetching summary page
2021-02-21 02:52:16,768 - INFO - pyhydroquebec.customer.0123456789 - Fetching summary page
2021-02-21 02:52:16,769 - INFO - pyhydroquebec - Selecting customer 0123456789
2021-02-21 02:52:16,769 - INFO - pyhydroquebec - Selecting customer 0123456789
2021-02-21 02:52:16,769 - INFO - pyhydroquebec - Selecting customer 0123456789
2021-02-21 02:52:25,660 - INFO - pyhydroquebec - Customer 0123456789 selected
2021-02-21 02:52:25,660 - INFO - pyhydroquebec - Customer 0123456789 selected
2021-02-21 02:52:25,660 - INFO - pyhydroquebec - Customer 0123456789 selected
2021-02-21 02:52:31,857 - INFO - pyhydroquebec.customer.0123456789 - Fetching current period data
2021-02-21 02:52:31,857 - INFO - pyhydroquebec.customer.0123456789 - Fetching current period data
2021-02-21 02:52:31,857 - INFO - pyhydroquebec.customer.0123456789 - Fetching current period data
2021-02-21 02:52:36,380 - INFO - pyhydroquebec.customer.0123456789 - Fetching daily data between 2021-02-19 and 2021-02-19
2021-02-21 02:52:36,380 - INFO - pyhydroquebec.customer.0123456789 - Fetching daily data between 2021-02-19 and 2021-02-19
2021-02-21 02:52:36,380 - INFO - pyhydroquebec.customer.0123456789 - Fetching daily data between 2021-02-19 and 2021-02-19
2021-02-21 02:52:36,436 - INFO - mqtt-hydroquebec - Waiting for 10800 seconds before the next check

PyHydroQuebec and Python version Latest docker images.

registry.gitlab.com/ttblt-hass/pyhydroquebec/mqtt   master    be277f330a52   16 months ago   115MB

Hydroquebec rate

Select your rate:

Hydroquebec multi-contract Do you have more than one contract with HydroQuebec ?

Corner Cases Are you in one of this situations:

Additional context

kayrozen commented 3 years ago

I also have this situation