Skip to content

Commit

Permalink
Removing possible stop condition
Browse files Browse the repository at this point in the history
  • Loading branch information
goulven authored and goulven committed Oct 6, 2024
1 parent 274dec5 commit 458b12f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 29 deletions.
19 changes: 0 additions & 19 deletions api/src/main/java/org/open4goods/api/config/yml/ApiProperties.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,6 @@ public class ApiProperties {
*/
private Integer dataFragmentsDequeueSize = 200;

/**
* The datafragments dequeue worker size
*/
private Integer dataFragmentsDequeueWorkers = 4;

/**
* The datafragments worker dequeue poll period, in ms
*/
Expand Down Expand Up @@ -403,20 +398,6 @@ public void setRootFolder(final String rootFolder) {





public Integer getDataFragmentsDequeueWorkers() {
return dataFragmentsDequeueWorkers;
}



public void setDataFragmentsDequeueWorkers(Integer dataFragmentsDequeueWorker) {
dataFragmentsDequeueWorkers = dataFragmentsDequeueWorker;
}



public boolean isOperatesNlpProcessing() {
return operatesNlpProcessing;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ public void start(final DataSourceProperties pConfig, final String datasourceCon
@Override
public void stop(final String providerName) {
indexationService.clearIndexedCounter(providerName);
runningJobs.get(providerName).stop();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public class CsvIndexationWorker implements Runnable {
/**
* State flag
*/
private volatile boolean stop;
// private volatile boolean stop;

/**
* The externaly maintained stats
Expand Down Expand Up @@ -117,7 +117,7 @@ public CsvIndexationWorker(final CsvDatasourceFetchingService csvService, DataFr

@Override
public void run() {
while (!stop) {
while (true) {
try {
if (!csvService.getQueue().isEmpty()) {
// There is data to consume and queue consummation is enabled
Expand Down Expand Up @@ -696,13 +696,6 @@ private List<String> getCategoryFromCsvRows(Map<String, String> item) {
return ret;
}

/**
* Say this thread to stop
*/
public void stop() {
this.stop = true;
}

public synchronized IndexationJobStat stats() {
return stats;
}
Expand Down

0 comments on commit 458b12f

Please sign in to comment.