class NotificationManager {

    @Transactional(propagation = Propagation.REQUIRED)
    public void notifyLongPausedRuns(final List<PipelineRun> pausedRuns) {
        final List<PipelineRun> longPausedRuns = createNotificationsForLongPausedRuns(pausedRuns,
                NotificationType.LONG_PAUSED);

        if (CollectionUtils.isEmpty(longPausedRuns)) {
            return;
        }

        final List<Long> runIds = longPausedRuns.stream()
                .map(PipelineRun::getId)
                .collect(Collectors.toList());
        monitoringNotificationDao.updateNotificationTimestamp(runIds, NotificationType.LONG_PAUSED);
    }

}