@SuppressWarnings("FutureReturnValueIgnored") private void reschedule(String integrationId) { LOG.debug("Reschedule IntegrationDeployment check, id:{}, keys: {}", integrationId, scheduledChecks); scheduler.schedule(() -> { IntegrationDeployment i = dataManager.fetch(IntegrationDeployment.class, integrationId); LOG.debug("Trigger checkIntegrationStatus, id:{}", integrationId); checkIntegrationStatus(i); }, SCHEDULE_INTERVAL_IN_SECONDS, TimeUnit.SECONDS ); }
@SuppressWarnings("FutureReturnValueIgnored") private void reschedule(String integrationId) { scheduler.schedule(() -> { IntegrationDeployment i = dataManager.fetch(IntegrationDeployment.class, integrationId); checkIntegrationStatus(i); }, SCHEDULE_INTERVAL_IN_SECONDS, TimeUnit.SECONDS); }
private void checkIntegrationStatusIfNotAlreadyInProgress(String id) { executor.execute(() -> { IntegrationDeployment integrationDeployment = dataManager.fetch(IntegrationDeployment.class, id); if( integrationDeployment!=null ) { String scheduledKey = getIntegrationMarkerKey(integrationDeployment); // Don't start check is already a check is running if (!scheduledChecks.contains(scheduledKey)) { checkIntegrationStatus(integrationDeployment); } } }); }
private void scanIntegrationsForWork() { executor.execute(() -> { dataManager.fetchAll(IntegrationDeployment.class).getItems().forEach(integration -> { LOG.info("Checking integrations for their status."); checkIntegrationStatus(integration); }); }); }
private void scanIntegrationsForWork() { executor.execute(() -> { dataManager.fetchAll(IntegrationDeployment.class).getItems().forEach(integration -> { LOG.info("Checking integrations for their status."); checkIntegrationStatus(integration); }); }); }
private void checkIntegrationStatusIfNotAlreadyInProgress(String id) { executor.execute(() -> { IntegrationDeployment integrationDeployment = dataManager.fetch(IntegrationDeployment.class, id); if( integrationDeployment != null) { String scheduledKey = getIntegrationMarkerKey(integrationDeployment); LOG.debug("Check if IntegrationStatus {} is already in progress for key: {} (keys: {})", id, scheduledKey, scheduledChecks); // Don't start check is already a check is running if (!scheduledChecks.contains(scheduledKey)) { checkIntegrationStatus(integrationDeployment); } else { LOG.debug("A check for IntegrationDeployment {} is already configured with key {}", id, scheduledKey); } } else { LOG.debug("No IntegrationDeployment with id: {}", id); } }); }