def apps(self, filters): oozie_api = get_oozie(self.user) kwargs = { 'cnt': hasattr(OOZIE_JOBS_COUNT, 'get') and OOZIE_JOBS_COUNT.get(), 'filters': [] } filters.pop('time') _filter_oozie_jobs(self.user, filters, kwargs) jobs = oozie_api.get_coordinators(**kwargs) return { 'apps': [{ 'id': app['id'], 'name': app['appName'], 'status': app['status'], 'apiStatus': self._api_status(app['status']), 'type': 'schedule', 'user': app['user'], 'progress': app['progress'], 'queue': app['group'], 'duration': app['durationInMillis'], 'submitted': app['lastActionInMillis'] * 1000, 'canWrite': app['canEdit'] } for app in massaged_oozie_jobs_for_json( jobs.jobs, self.user)['jobs']], 'total': jobs.total }
def apps(self, filters): oozie_api = get_oozie(self.user) kwargs = {'cnt': hasattr(OOZIE_JOBS_COUNT, 'get') and OOZIE_JOBS_COUNT.get(), 'filters': []} filters.pop('time') _filter_oozie_jobs(self.user, filters, kwargs) jobs = oozie_api.get_coordinators(**kwargs) return { 'apps':[{ 'id': app['id'], 'name': app['appName'], 'status': app['status'], 'apiStatus': self._api_status(app['status']), 'type': 'schedule', 'user': app['user'], 'progress': app['progress'], 'queue': app['group'], 'duration': app['durationInMillis'], 'submitted': app['lastActionInMillis'] * 1000, 'canWrite': app['canEdit'] } for app in massaged_oozie_jobs_for_json(jobs.jobs, self.user)['jobs']], 'total': jobs.total }
def apps(self, filters): oozie_api = get_oozie(self.user) kwargs = {'cnt': OOZIE_JOBS_COUNT.get(), 'filters': []} _filter_oozie_jobs(self.user, filters, kwargs) jobs = oozie_api.get_coordinators(**kwargs) return { 'apps': [{ 'id': app['id'], 'name': app['appName'], 'status': app['status'], 'apiStatus': self._api_status(app['status']), 'type': 'schedule', 'user': app['user'], 'progress': app['progress'], 'duration': app['durationInMillis'], 'submitted': app['startTimeInMillis'] } for app in massaged_oozie_jobs_for_json( jobs.jobs, self.user)['jobs']], 'total': jobs.total }
def apps(self, filters): oozie_api = get_oozie(self.user) kwargs = {'cnt': OOZIE_JOBS_COUNT.get(), 'filters': []} _filter_oozie_jobs(self.user, filters, kwargs) jobs = oozie_api.get_bundles(**kwargs) return { 'apps': [{ 'id': app['id'], 'name': app['appName'], 'status': app['status'], 'apiStatus': self._api_status(app['status']), 'type': 'bundle', 'user': app['user'], 'progress': app['progress'], 'queue': app['group'], 'duration': app['durationInMillis'], 'submitted': app['kickoffTimeInMillis'] * 1000, 'canWrite': app['canEdit'] } for app in massaged_oozie_jobs_for_json( jobs.jobs, self.user)['jobs']], 'total': jobs.total }