Netflix / dispatch

All of the ad-hoc things you're doing to manage incidents today, done for you, and much more!
Apache License 2.0
5k stars 495 forks source link

bugfix: get_session() contextmgr usage in consume_signals() #4888

Closed wssheldon closed 3 months ago

wssheldon commented 3 months ago

Resolves:

AttributeError-'_GeneratorContextManager' object has no attribute 'query'

on

    install_plugins()
    db_session = get_session()
    organizations = get_all_organizations(db_session=db_session)

---> 

def get_all(*, db_session) -> List[Optional[Organization]]:
    """Gets all organizations."""
    return db_session.query(Organization)   <---