Пример #1
0
 /*----------------------------------------------------------------------------------------------------*/
 private void saveToDatabase(List<Instrument> databaseInstruments) {
   try {
     instrumentRepository.save(databaseInstruments);
   } catch (Exception e) {
     LOGGER.error("Something Went Wrong While Saveing To Database: " + e.getMessage());
   }
 }
Пример #2
0
 /*----------------------------------------------------------------------------------------------------*/
 public void execute(Execution execution) {
   LOGGER.info("Started Loading Static Market Data");
   try {
     List<Instrument> databaseInstruments = instrumentRepository.findAll();
     setRepTime(execution);
     addEnglishTASEInstruments(databaseInstruments);
     addHebrewTASEInstrumentFields(databaseInstruments);
     saveToDatabase(databaseInstruments);
   } catch (Exception e) {
     LOGGER.error(e.getMessage());
   }
 }