mirror of
https://github.com/kestra-io/kestra.git
synced 2025-12-23 21:04:39 -05:00
@@ -13,6 +13,7 @@ import io.kestra.core.queues.WorkerTaskQueueInterface;
|
||||
import io.kestra.core.runners.*;
|
||||
import io.micronaut.context.ApplicationContext;
|
||||
import io.micronaut.context.annotation.Factory;
|
||||
import io.micronaut.context.annotation.Prototype;
|
||||
import jakarta.inject.Inject;
|
||||
import jakarta.inject.Named;
|
||||
import jakarta.inject.Singleton;
|
||||
@@ -109,7 +110,7 @@ public class PostgresQueueFactory implements QueueFactoryInterface {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Singleton
|
||||
@Prototype // must be prototype so we can create two Worker in the same application context for testing purpose.
|
||||
public WorkerTaskQueueInterface workerTaskQueue() {
|
||||
return new PostgresWorkerTaskQueue(applicationContext);
|
||||
}
|
||||
|
||||
@@ -10,8 +10,6 @@ import jakarta.inject.Singleton;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
@Singleton
|
||||
@PostgresQueueEnabled
|
||||
public class PostgresWorkerTaskQueue implements WorkerTaskQueueInterface {
|
||||
QueueInterface<WorkerTask> workerTaskQueue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user