J. Nick Koston
a2dae60170
Refactor dispatcher to reduce run time and memory overhead ( #99676 )
...
* Fix memory leak in dispatcher removal
When we removed the last job/callable from the dict for the
signal we did not remove the dict for the signal which meant
it leaked
* comment
* cleanup a bit more
2023-09-05 21:18:27 -04:00
J. Nick Koston
11681f3f31
Pass a helpful name when creating common asyncio tasks in core ( #89171 )
2023-03-05 12:46:02 +01:00
Marc Mueller
1626c53c13
Improve dispatcher helper typing ( #75455 )
...
* Improve dispatcher helper typing
* Code review
2022-07-20 04:11:46 +02:00
J. Nick Koston
1dd9e705f2
Switch dispatcher to use async_run_hass_job ( #74514 )
...
* Switch dispatcher to use async_run_hass_job
- Since we already wrap all the callbacks in catch_log_exception
we can use async_run_hass_job here
- The overhead of wrapping the call in a call_soon, queuing it
and running it later usually exceeds the overhead of running
the job itself
* fix size change during iteration
* fix out of order send
* fix missing mocking in unifi test
* Fix Legrand Home+ Control updating entities before the coordinator update had finished
* stray debug
2022-07-07 10:39:05 -05:00
J. Nick Koston
6c3baf03aa
Make dispatcher setup lazy ( #74374 )
2022-07-04 14:58:35 +02:00
Marc Mueller
77ee72cbb9
Import Callable from collections.abc (1) ( #56775 )
2021-09-29 16:32:11 +02:00
Franck Nijhof
38d14702fa
Remove HomeAssistantType alias from helpers ( #48400 )
2021-03-27 12:55:24 +01:00
J. Nick Koston
9e1461da62
Determine how to run listeners at setup time instead of execution time ( #41304 )
2020-10-07 16:51:50 +02:00
Paulus Schoutsen
73c52e668e
Fix dispatcher logging ( #33299 )
2020-03-26 20:44:44 -07:00
Bas Nijholt
67c56c860d
Sort imports according to PEP8 for 'homeassistant' folder ( #29789 )
...
Components are already done
2019-12-09 16:42:10 +01:00
Paulus Schoutsen
4de97abc3a
Black
2019-07-31 12:25:30 -07:00
emontnemery
6800871c13
Log exceptions thrown by signal callbacks ( #20015 )
...
* Log exceptions thrown by signal callbacks
* Fix unsub
* Simplify traceback print
* Typing
* Add test
* lint
* Review comments
* Rework MQTT test case
* Fix bad merge
* Fix bad merge
2019-01-17 14:44:57 -08:00
Ville Skyttä
922f34f72d
Add more type hints to helpers ( #18196 )
...
* Test typing for helpers.__init__ and temperature
* Add type hints to helpers.sun
* Add type hints to helpers.signal
* Add type hints to helpers.entity_values
* Add type hints to helpers.dispatcher
2018-11-04 22:46:42 +01:00
Matthias Urlichs
f5cc40024d
Rename homeassistant.util.async to .async_ ( #13088 )
...
"async" is (going to be) a reserved word.
2018-03-11 10:01:12 -07:00
Paulus Schoutsen
ca54bbfcc9
RFC: Use bind_hass for helpers ( #9745 )
...
* Add Helpers bind_hass functionality
* Update other helpers
2017-10-08 08:17:54 -07:00
Fabian Affolter
0863d50210
Fix typos ( #7957 )
...
Add an optional extended description…
2017-06-08 15:53:12 +02:00
Fabian Affolter
a4f1f6e724
Update docstrings ( #7374 )
...
* Update docstrings
* Update docstrings
* Update docstrings
* Update docstrings
* Update docstrings
* Update docstrings
* Update docstring
* Update docstrings
* Update docstrings
* Fix lint issues
* Update docstrings
* Revert changes in dict
2017-05-02 09:18:47 -07:00
Pascal Vizeli
20fcd1f0e2
Bugfix mqtt socket memory error ( #6501 )
...
* Bugfix mqtt socket memory error
* Fix tests
* Fix lint
2017-03-09 06:31:43 -08:00
Pascal Vizeli
81ca978413
Move mqtt from eventbus to dispatcher / add unsub for dispatcher ( #6206 )
...
* Move mqtt from eventbus to dispatcher / add unsub for dispatcher
* Fix lint
* Fix test
* Fix lint v2
* fix dispatcher_send
2017-02-24 17:11:50 -08:00
Pascal Vizeli
f2a2d6bfa1
Refactory of envisalink ( #6160 )
...
* Refactory of envisalink
* remove event buss
* init dispatcher from hass.
* Move platform to new dispatcher
* fix lint
* add unittest & threadded functions
* fix copy & past error
2017-02-23 13:02:56 -08:00