Esempio n. 1
0
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')
Esempio n. 2
0
# 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')

Esempio n. 3
0
 def get(self):
     pipelines = Pipeline.all()
     return pipelines
Esempio n. 4
0
 def get(self):
     tracker = insight.GAProvider()
     tracker.track_event(category='pipelines', action='list')
     pipelines = Pipeline.all()
     return pipelines
Esempio n. 5
0
 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')