last thing i wanted to make a config setting
This commit is contained in:
parent
e77ee73bfc
commit
0a18eeb5f3
@ -10,3 +10,4 @@ app.interval_days=4
|
||||
app.string_count=14000
|
||||
app.thread_count=4
|
||||
app.interval_days_minus=4
|
||||
app.random_length=2.5
|
||||
|
@ -587,7 +587,13 @@ public class Datahandler {
|
||||
|
||||
//System.out.println(ues_copy.toString());
|
||||
ArrayList<Future<SentimentAnalyzerTest>> futures = new ArrayList<>();
|
||||
|
||||
Properties prop = new Properties();
|
||||
String fileName = "app.config";
|
||||
try (FileInputStream fis = new FileInputStream(fileName)) {
|
||||
prop.load(fis);
|
||||
} catch (FileNotFoundException ex) {
|
||||
} catch (IOException ex) {
|
||||
}
|
||||
for (String str1 : ues_copy) {
|
||||
if (strF != str1) {
|
||||
//critical section
|
||||
@ -726,8 +732,6 @@ public class Datahandler {
|
||||
} catch (InterruptedException e) {
|
||||
//throw new RuntimeException(e);
|
||||
pending = 0;
|
||||
Properties prop = new Properties();
|
||||
String fileName = "app.config";
|
||||
try (FileInputStream fis = new FileInputStream(fileName)) {
|
||||
prop.load(fis);
|
||||
} catch (FileNotFoundException ex) {
|
||||
@ -740,8 +744,6 @@ public class Datahandler {
|
||||
} catch (ExecutionException e) {
|
||||
//throw new RuntimeException(e);
|
||||
pending = 0;
|
||||
Properties prop = new Properties();
|
||||
String fileName = "app.config";
|
||||
try (FileInputStream fis = new FileInputStream(fileName)) {
|
||||
prop.load(fis);
|
||||
} catch (FileNotFoundException ex) {
|
||||
@ -762,9 +764,10 @@ public class Datahandler {
|
||||
//double randomLenghtPermit = strF.length() * (Math.random() * Math.random() * (Math.random() * 10));
|
||||
Collections.reverse(concurrentRelations);
|
||||
ArrayList<String> mysqlUpdateLastUsed = new ArrayList();
|
||||
Double aDouble = Double.valueOf(prop.getProperty("app.random_length"));
|
||||
if (!concurrentRelations.isEmpty()) {
|
||||
for (String secondaryRelation : concurrentRelations) {
|
||||
if (SB.toString().length() > strF.length() * 3 && !SB.toString().isEmpty()) {
|
||||
if (SB.toString().length() > strF.length() * aDouble && !SB.toString().isEmpty()) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user