Подключите RabbitMQ и отдельный обработчик заданий
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package processing
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
|
||||
"messenger/internal/pipeline"
|
||||
"messenger/internal/platform/faultbarrier"
|
||||
)
|
||||
|
||||
// Only the explicit fault experiment enables these one-shot barriers.
|
||||
func FileBarrier(dir string) func(context.Context, pipeline.Job, string) error {
|
||||
return func(ctx context.Context, j pipeline.Job, phase string) error {
|
||||
base := filepath.Join(dir, fmt.Sprintf("%s-v%d-%s", j.AttachmentID, j.PipelineVersion, phase))
|
||||
return faultbarrier.Wait(ctx, base, "")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user