def get_total_failed_builds(**kwargs): failed_builds = 0 for build in store.get_builds(): last_passed = store.get_last_passed_execution(build, kwargs['begin'], kwargs['end']) if not last_passed or last_passed is None: failed_builds += 1 return {}, [failed_builds]
def get_total_passed_builds(**kwargs): success_builds = 0 for build in store.get_builds(): last_passed = store.get_last_passed_execution(build, kwargs['begin'], kwargs['end']) if last_passed: success_builds += 1 return {}, [success_builds]