@@ -58,6 +58,7 @@ func InitTicker(store *store.Store, scheduler *scheduler.Scheduler) {
5858// Every file will be handled as an active pipeline and therefore
5959// saved in the global active pipelines slice.
6060func checkActivePipelines () {
61+ var existingPipelineNames []string
6162files ,err := ioutil .ReadDir (gaia .Cfg .PipelinePath )
6263if err != nil {
6364gaia .Cfg .Logger .Error ("cannot read pipelines folder" ,"error" ,err .Error (),"path" ,gaia .Cfg .PipelinePath )
@@ -78,6 +79,8 @@ func checkActivePipelines() {
7879// Get real pipeline name and check if the global active pipelines slice
7980// already contains it.
8081pName := getRealPipelineName (n ,pType )
82+ // Add the real pipeline name to the slice of existing pipeline names.
83+ existingPipelineNames = append (existingPipelineNames ,pName )
8184if GlobalActivePipelines .Contains (pName ) {
8285// If SHA256Sum is set, we should check if pipeline has been changed.
8386p := GlobalActivePipelines .GetByName (pName )
@@ -113,7 +116,7 @@ func checkActivePipelines() {
113116continue
114117}
115118
116- // We couldn'tfinde the pipeline. Create a new one.
119+ // We couldn'tfind the pipeline. Create a new one.
117120var shouldStore = false
118121if pipeline == nil {
119122// Create pipeline object and fill it with information
@@ -152,6 +155,7 @@ func checkActivePipelines() {
152155GlobalActivePipelines .Append (* pipeline )
153156}
154157}
158+ GlobalActivePipelines .RemoveDeletedPipelines (existingPipelineNames )
155159}
156160
157161// getPipelineType looks up for specific suffix on the given file name.