コード例 #1
0
def deploy_build_done():
    d = request.json
    attributes = d['attributes']
    target = FQSHA.from_json(json.loads(attributes['target']))
    job = Job(batch_client, d['id'], attributes=attributes, _status=d)
    receive_deploy_job(target, job)
    return '', 200
コード例 #2
0
def ci_build_done():
    d = request.json
    attributes = d['attributes']
    source = FQSHA.from_json(json.loads(attributes['source']))
    target = FQSHA.from_json(json.loads(attributes['target']))
    job = Job(batch_client, d['id'], attributes=attributes, _status=d)
    receive_ci_job(source, target, job)
    return '', 200
コード例 #3
0
ファイル: test_dag.py プロジェクト: zscu/hail
def test_missing_parent_is_400(client):
    try:
        batch = client.create_batch()
        fake_job = aioclient.Job.unsubmitted_job(batch._async_builder, 10000)
        fake_job = Job.from_async_job(fake_job)
        batch.create_job('alpine:3.8',
                         command=['echo', 'head'],
                         parents=[fake_job])
        batch.submit()
    except ValueError as err:
        assert re.search('parents with invalid job ids', str(err))
        return
    assert False