From 67450ba403cc0cdeee6a2ecd973520f8ef94078f 2016-10-17 09:05:14 From: Marcin Lulek Date: 2016-10-17 09:05:14 Subject: [PATCH] application: add all() method to service --- diff --git a/backend/src/appenlight/models/services/application.py b/backend/src/appenlight/models/services/application.py index 4811893..5e627db 100644 --- a/backend/src/appenlight/models/services/application.py +++ b/backend/src/appenlight/models/services/application.py @@ -37,9 +37,14 @@ from appenlight.models.services.event import EventService log = logging.getLogger(__name__) -# cache_memory_min_1 = get_region('memory_min_1') - class ApplicationService(BaseService): + + @classmethod + def all(cls, db_session=None): + db_session = get_db_session(db_session) + q = db_session.query(Application) + return q + @classmethod def by_api_key(cls, api_key, db_session=None): db_session = get_db_session(db_session)