···30 did text primary key
31 );
3233- create table if not exists pipelines (
34- at_uri text not null,
035 status text not null,
3637 -- only set if status is 'failed'
···42 updated_at timestamp not null default (strftime('%Y-%m-%dT%H:%M:%SZ', 'now')),
43 finished_at timestamp,
4445- primary key (at_uri)
46 );
47 `)
48 if err != nil {
···30 did text primary key
31 );
3233+ create table if not exists pipeline_status (
34+ rkey text not null,
35+ pipeline text not null,
36 status text not null,
3738 -- only set if status is 'failed'
···43 updated_at timestamp not null default (strftime('%Y-%m-%dT%H:%M:%SZ', 'now')),
44 finished_at timestamp,
4546+ primary key (rkey)
47 );
48 `)
49 if err != nil {
···4748// SetupPipeline sets up a new network for the pipeline, and possibly volumes etc.
49// in the future. In here also goes other setup steps.
50-func (e *Engine) SetupPipeline(ctx context.Context, pipeline *tangled.Pipeline, id string) error {
51 e.l.Info("setting up pipeline", "pipeline", id)
5253 _, err := e.docker.VolumeCreate(ctx, volume.CreateOptions{
···73 return err
74 }
7576- err = e.db.CreatePipeline(id, e.n)
77 return err
78}
79
···4748// SetupPipeline sets up a new network for the pipeline, and possibly volumes etc.
49// in the future. In here also goes other setup steps.
50+func (e *Engine) SetupPipeline(ctx context.Context, pipeline *tangled.Pipeline, atUri, id string) error {
51 e.l.Info("setting up pipeline", "pipeline", id)
5253 _, err := e.docker.VolumeCreate(ctx, volume.CreateOptions{
···73 return err
74 }
7576+ err = e.db.CreatePipeline(id, atUri, e.n)
77 return err
78}
79