* Ensure logbook still responds if describe event throws
If describe fails, the logbook stream should not collapse
* Ensure logbook still responds if describe event throws
If describe fails, the logbook stream should not collapse
* Speed up logbook and history queries where ORM rows are not needed
This avoids having sqlalchemy wrap Result in ChunkedIteratorResult
which has additional overhead we do not need for these cases
* more places
* anything that uses _sorted_statistics_to_dict does not need orm rows either
* Remove legacy context lookup implemention from logbook
This object can now be replaced with a simple dict
* Remove legacy context lookup implemention from logbook
This object can now be replaced with a simple dict
* scope
* fix order issue
Adjust some variable names in the logbook process to improve readablity
There were some places were we used context_id that should have been context_id_bin
* refactor to make StatesMetaManager threadsafe
* refactor to make StatesMetaManager threadsafe
* refactor to make StatesMetaManager threadsafe
* refactor to make StatesMetaManager threadsafe
* reduce
* comments