Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.target>21</maven.compiler.target>
<maven.compiler.source>21</maven.compiler.source>
<gasw.version>4.2</gasw.version>
<gasw.version>4.5-SNAPSHOT</gasw.version>
<grida.version>3.3-SNAPSHOT</grida.version>
<boutiques-model.version>1.1</boutiques-model.version>
<revision>1.5</revision>
Expand Down Expand Up @@ -95,16 +95,7 @@
<version>2.1.2</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.18.0</version>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.3.2</version>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
Expand Down
19 changes: 7 additions & 12 deletions src/main/java/fr/insalyon/creatis/moteurlite/gasw/Monitor.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import fr.insalyon.creatis.moteurlite.workflowsdb.WorkflowsDBRepository;

import fr.insalyon.creatis.gasw.Gasw;
import fr.insalyon.creatis.gasw.GaswLauncher;
import fr.insalyon.creatis.gasw.GaswException;
import fr.insalyon.creatis.gasw.GaswExitCode;
import fr.insalyon.creatis.gasw.GaswOutput;
Expand All @@ -17,7 +18,7 @@
import fr.insalyon.creatis.moteurlite.MoteurLiteException;

public class Monitor extends Thread {
private static final Logger logger = LoggerFactory.getLogger(Monitor.class);

Check failure on line 21 in src/main/java/fr/insalyon/creatis/moteurlite/gasw/Monitor.java

View workflow job for this annotation

GitHub Actions / all

The constant name 'logger' doesn't match '[A-Z][A-Z_0-9]*'

Configurable naming conventions for field declarations. This rule reports variable declarations which do not match the regex that applies to their specific kind ---e.g. constants (static final), enum constant, final field. Each regex can be configured through properties. By default this rule uses the standard Java naming convention (Camel case), and uses the ALL_UPPER convention for constants and enum constants. FieldNamingConventions (Priority: 1, Ruleset: Code Style) https://docs.pmd-code.org/snapshot/pmd_rules_java_codestyle.html#fieldnamingconventions

private String workflowId;
private String applicationName;
Expand Down Expand Up @@ -45,16 +46,11 @@

List<GaswOutput> finishedJobs = gasw.getFinishedJobs();
logger.info("Number of finished jobs: " + finishedJobs.size());

if (finishedJobs.isEmpty()) {
continue;
} else {
try {
processFinishedJobs(finishedJobs);
workflowsDbRepository.persistProcessors(workflowId, applicationName, numberOfInvocations - finishedJobsNumber, successfulJobsNumber, failedJobsNumber);
} catch (MoteurLiteException e) {
logger.error("Error while persisting processors during processing: ", e);
}
try {
processFinishedJobs(finishedJobs);
workflowsDbRepository.persistProcessors(workflowId, applicationName, numberOfInvocations - finishedJobsNumber, successfulJobsNumber, failedJobsNumber);
} catch (MoteurLiteException e) {
logger.error("Error while persisting processors during processing: ", e);
}
} catch (InterruptedException e) {
terminate(true);
Expand All @@ -65,7 +61,6 @@
}

private synchronized void waitForGasw() throws InterruptedException {
gasw.waitForNotification();
wait();
}

Expand Down Expand Up @@ -104,7 +99,7 @@
}

workflowsDbRepository.persistWorkflow(workflowId, finalStatus);
gasw.terminate(killed);
GaswLauncher.stop(killed);
logger.info("workflow finished with status {}", finalStatus.name());
} catch (GaswException e) {
logger.error("Error while terminating Gasw: ", e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import java.util.List;
import java.util.Map;

import fr.insalyon.creatis.gasw.GaswLauncher;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand All @@ -27,7 +28,7 @@
import fr.insalyon.creatis.moteurlite.custom.ResultsDirectorySuffixService;

public class MoteurLiteRunner {
private static final Logger logger = LoggerFactory.getLogger(MoteurLite.class);

Check failure on line 31 in src/main/java/fr/insalyon/creatis/moteurlite/runner/MoteurLiteRunner.java

View workflow job for this annotation

GitHub Actions / all

The constant name 'logger' doesn't match '[A-Z][A-Z_0-9]*'

Configurable naming conventions for field declarations. This rule reports variable declarations which do not match the regex that applies to their specific kind ---e.g. constants (static final), enum constant, final field. Each regex can be configured through properties. By default this rule uses the standard Java naming convention (Camel case), and uses the ALL_UPPER convention for constants and enum constants. FieldNamingConventions (Priority: 1, Ruleset: Code Style) https://docs.pmd-code.org/snapshot/pmd_rules_java_codestyle.html#fieldnamingconventions

private final MoteurLiteConfiguration config;
private final WorkflowsDBRepository workflowsDBRepo;
Expand Down Expand Up @@ -122,7 +123,7 @@

private void initGaswAndMonitor(String workflowId, String descriptorName, int numberOfInvocations) throws MoteurLiteException {
try {
gasw = Gasw.getInstance();
gasw = GaswLauncher.start();
monitor = new Monitor(gasw, workflowsDBRepo, workflowId, descriptorName, numberOfInvocations);
gasw.setNotificationClient(monitor);
monitor.start();
Expand Down
Loading