Package org.eurekaj.api.dao

Examples of org.eurekaj.api.dao.AlertEvaluationQueueDao


 
  public void run() {
    try {
      log.info("Running GenerateNewAlertEvaluationQueue");
   
      AlertEvaluationQueueDao alertEvaluationQueueDao = dbPlugin.getAlertEvaluationQueueDao();
     
      long evaluationThreshold = System.currentTimeMillis() - 15000;
     
      List<Account> accountListForEvaluation = new ArrayList<>();
      for (Account account : dbPlugin.getAccountDao().getAccounts()) {
        log.info("Testing to see if account " + account.getId() + " needs to be evaluated");
        if (account.getLastEvaluatedForAlerts() == null || account.getLastEvaluatedForAlerts() < evaluationThreshold) {
          log.info("Adding " + account.getId() + " to new queue");
          accountListForEvaluation.add(account);
        }
      }   
     
      alertEvaluationQueueDao.addAccountsToNewQueue(accountListForEvaluation);
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
View Full Code Here

TOP

Related Classes of org.eurekaj.api.dao.AlertEvaluationQueueDao

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.