@@ -226,7 +226,7 @@ func executeJob(job *gaia.Job, p *gaia.Pipeline, logPath string, wg *sync.WaitGr
226
226
}
227
227
228
228
// Create new plugin instance
229
- pC , err := plugin .NewPlugin (c , logPath )
229
+ pC , err := plugin .NewPlugin (c , & logPath )
230
230
if err != nil {
231
231
gaia .Cfg .Logger .Error ("cannot initiate plugin before job execution" , "error" , err .Error ())
232
232
return
@@ -282,7 +282,7 @@ func (s *Scheduler) scheduleJobsByPriority(r *gaia.PipelineRun, p *gaia.Pipeline
282
282
283
283
// Execute this job in a separate goroutine
284
284
path := filepath .Join (gaia .Cfg .WorkspacePath , strconv .Itoa (r .PipelineID ), strconv .Itoa (r .ID ), gaia .LogsFolderName )
285
- path = filepath .Join (path , strconv .Itoa ( job .ID ))
285
+ path = filepath .Join (path , strconv .FormatUint ( uint64 ( job .ID ), 10 ))
286
286
go executeJob (& r .Jobs [id ], p , path , & wg , triggerSave )
287
287
}
288
288
}
@@ -334,17 +334,13 @@ func (s *Scheduler) getPipelineJobs(p *gaia.Pipeline) ([]gaia.Job, error) {
334
334
return nil , errCreateCMDForPipeline
335
335
}
336
336
337
- // Create log folder (if not exist)
338
- path := filepath .Join (gaia .Cfg .WorkspacePath , strconv .Itoa (r .PipelineID ), strconv .Itoa (r .ID ), gaia .LogsFolderName )
339
- err := os .MkdirAll (path , 0700 )
337
+ // Create new plugin instance
338
+ pC , err := plugin .NewPlugin (c , nil )
340
339
if err != nil {
341
- gaia .Cfg .Logger .Error ("cannot create folder before get pipeline jobs " , "error" , err .Error (), "path" , path )
340
+ gaia .Cfg .Logger .Error ("cannot initiate plugin " , "error" , err .Error ())
342
341
return nil , err
343
342
}
344
343
345
- // Create new plugin instance
346
- pC , err := plugin .NewPlugin (c )
347
-
348
344
// Connect to plugin(pipeline)
349
345
if err := pC .Connect (); err != nil {
350
346
gaia .Cfg .Logger .Debug ("cannot connect to pipeline" , "error" , err .Error (), "pipeline" , p )
0 commit comments