-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
470 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
core/src/main/java/io/kestra/core/repositories/WorkerJobRunningInterface.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package io.kestra.core.repositories; | ||
|
||
import io.kestra.core.runners.WorkerJobRunning; | ||
|
||
import java.util.List; | ||
import java.util.Optional; | ||
|
||
public interface WorkerJobRunningInterface { | ||
Optional<WorkerJobRunning> findByTaskRunId(String taskRunId); | ||
|
||
void delete(String taskRunId); | ||
|
||
WorkerJobRunning save(WorkerJobRunning workerJobRunning); | ||
|
||
List<WorkerJobRunning> getWorkerJobWithWorkerDead(List<String> workersAlive); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
jdbc-h2/src/main/java/io/kestra/repository/h2/H2WorkerJobRunningRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package io.kestra.repository.h2; | ||
|
||
import io.kestra.core.runners.WorkerJobRunning; | ||
import io.kestra.jdbc.repository.AbstractJdbcWorkerJobRunningRepository; | ||
import io.micronaut.context.ApplicationContext; | ||
import jakarta.inject.Inject; | ||
import jakarta.inject.Singleton; | ||
|
||
@Singleton | ||
@H2RepositoryEnabled | ||
public class H2WorkerJobRunningRepository extends AbstractJdbcWorkerJobRunningRepository { | ||
@Inject | ||
public H2WorkerJobRunningRepository(ApplicationContext applicationContext) { | ||
super(new H2Repository<>(WorkerJobRunning.class, applicationContext)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
jdbc-mysql/src/main/java/io/kestra/repository/mysql/MysqlWorkerJobRunningRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package io.kestra.repository.mysql; | ||
|
||
import io.kestra.core.runners.WorkerJobRunning; | ||
import io.kestra.jdbc.repository.AbstractJdbcWorkerJobRunningRepository; | ||
import io.micronaut.context.ApplicationContext; | ||
import jakarta.inject.Inject; | ||
import jakarta.inject.Singleton; | ||
|
||
@Singleton | ||
@MysqlRepositoryEnabled | ||
public class MysqlWorkerJobRunningRepository extends AbstractJdbcWorkerJobRunningRepository { | ||
@Inject | ||
public MysqlWorkerJobRunningRepository(ApplicationContext applicationContext) { | ||
super(new MysqlRepository<>(WorkerJobRunning.class, applicationContext)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...tgres/src/main/java/io/kestra/repository/postgres/PostgresWorkerJobRunningRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package io.kestra.repository.postgres; | ||
|
||
import io.kestra.core.runners.WorkerJobRunning; | ||
import io.kestra.jdbc.repository.AbstractJdbcWorkerJobRunningRepository; | ||
import io.micronaut.context.ApplicationContext; | ||
import jakarta.inject.Inject; | ||
import jakarta.inject.Singleton; | ||
|
||
@Singleton | ||
@PostgresRepositoryEnabled | ||
public class PostgresWorkerJobRunningRepository extends AbstractJdbcWorkerJobRunningRepository { | ||
@Inject | ||
public PostgresWorkerJobRunningRepository(ApplicationContext applicationContext) { | ||
super(new PostgresRepository<>(WorkerJobRunning.class, applicationContext)); | ||
} | ||
} |
Oops, something went wrong.