mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-08-06 17:40:58 +00:00
shared container for job
This commit is contained in:
parent
a3af4d491b
commit
12ac7300b9
10 changed files with 444 additions and 531 deletions
|
@ -40,6 +40,15 @@ func NewInfoExecutor(format string, args ...interface{}) Executor {
|
|||
}
|
||||
}
|
||||
|
||||
// NewDebugExecutor is an executor that logs messages
|
||||
func NewDebugExecutor(format string, args ...interface{}) Executor {
|
||||
return func(ctx context.Context) error {
|
||||
logger := Logger(ctx)
|
||||
logger.Debugf(format, args...)
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// NewPipelineExecutor creates a new executor from a series of other executors
|
||||
func NewPipelineExecutor(executors ...Executor) Executor {
|
||||
if len(executors) == 0 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue