Implement default worker factory

This commit is contained in:
Jay
2026-04-17 18:59:13 -04:00
parent f83df839b5
commit 485d49fcae
3 changed files with 17 additions and 1 deletions
+9
View File
@@ -21,6 +21,15 @@ func NewWorker(
config *WorkerConfig,
) (*Worker, error) {
if config == nil {
config = GetDefaultWorkerConfig()
}
err := ValidateWorkerConfig(config)
if err != nil {
return nil, err
}
w := &Worker{
id: id,
stop: stop,