Exemplo n.º 1
0
def start_build(build, lock_id=None):
    queue = django_rq.get_queue(build.plan.queue)
    result = queue.enqueue(run_build,
                           build.id,
                           lock_id,
                           job_timeout=build.plan.build_timeout)
    build.task_id_check = None
    build.task_id_run = result.id
    build.save()
    autoscale()
    return result
Exemplo n.º 2
0
 def test_autoscale(self, get_autoscaler):
     get_autoscaler.return_value.target_workers = 1
     scale_info = autoscale()
     assert scale_info["test-app"] == 1