def reset_jobs_and_pipelines_statuses_to_idle(): from core.models import Pipeline for pipeline in Pipeline.all(): for job in pipeline.jobs: job.update(status='idle') pipeline.update(status='idle')
# Copyright 2018 Google Inc # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import run_ibackend from core.models import Pipeline # Reset status of pipelines and jobs to 'idle'. for p in Pipeline.all(): for j in p.jobs: j.update(status='idle') p.update(status='idle')
def get(self): pipelines = Pipeline.all() return pipelines
def get(self): tracker = insight.GAProvider() tracker.track_event(category='pipelines', action='list') pipelines = Pipeline.all() return pipelines
def reset_pipelines(): """Reset pipelines and jobs statuses.""" for pipeline in Pipeline.all(): for job in pipeline.jobs: job.update(status='idle') pipeline.update(status='idle')