/[projects]/dao/FuldDaekningWorker/src/dk/daoas/fulddaekning/LookupMain.java
ViewVC logotype

Diff of /dao/FuldDaekningWorker/src/dk/daoas/fulddaekning/LookupMain.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2241 by torben, Wed Dec 10 09:50:33 2014 UTC revision 2244 by torben, Wed Dec 10 10:06:32 2014 UTC
# Line 52  public class LookupMain { Line 52  public class LookupMain {
52                  conf.load( new FileReader(confFile) );                  conf.load( new FileReader(confFile) );
53                                    
54                  max_workers = Integer.parseInt( conf.getSafeProperty("MAX_WORKERS") );                  max_workers = Integer.parseInt( conf.getSafeProperty("MAX_WORKERS") );
55                    if (max_workers <= 0) {
56                            logger.info("!!! AUTO-DETECT MAX_WORKERS !!!");
57                            int cores = Runtime.getRuntime().availableProcessors();
58                            cores -= 1;//Efterlad 1 core/cpu i reserve til systemet
59                            
60                            max_workers = Math.max(1, cores); //Dog skal der som minimum være 1 core til beregning
61                            
62                    }
63                  logger.info("Starting with MAX_WORKERS:" + max_workers);                  logger.info("Starting with MAX_WORKERS:" + max_workers);
64                                    
65                    
66                  verbose = Boolean.parseBoolean( conf.getSafeProperty("VERBOSE") );                  verbose = Boolean.parseBoolean( conf.getSafeProperty("VERBOSE") );
67                  logger.info("Starting with VERBOSE:" + verbose);                  logger.info("Starting with VERBOSE:" + verbose);
68                                    

Legend:
Removed from v.2241  
changed lines
  Added in v.2244

  ViewVC Help
Powered by ViewVC 1.1.20