38 lines
687 B
C#
38 lines
687 B
C#
using System.Collections.Generic;
|
|
using ln.threading;
|
|
|
|
namespace ln.build
|
|
{
|
|
public class CIService
|
|
{
|
|
|
|
public Pool buildPool;
|
|
|
|
HashSet<PipeLine> pipelines = new HashSet<PipeLine>();
|
|
public IEnumerable<PipeLine> PipeLines => pipelines;
|
|
|
|
public CIService()
|
|
{
|
|
buildPool = new Pool(2);
|
|
}
|
|
|
|
public void Start()
|
|
{
|
|
buildPool.Start();
|
|
}
|
|
|
|
public void AddPipeline(PipeLine pipeLine)
|
|
{
|
|
pipelines.Add(pipeLine);
|
|
}
|
|
|
|
public void Enqueue(CIJob job)
|
|
{
|
|
job.CurrentCIService = this;
|
|
buildPool.Enqueue(job);
|
|
}
|
|
|
|
|
|
|
|
}
|
|
} |