@ Service public List < Task > batchPoll ( String taskType , String workerId , String domain , Integer count , Integer timeout ) { List < Task > polledTasks = executionService . poll ( taskType , workerId , domain , count , timeout ) ; LOGGER . debug ( "The Tasks {} being returned for /tasks/poll/{}?{}&{}" , polledTasks . stream ( ) . map ( Task :: getTaskId ) . collect ( Collectors . toList ( ) ) , taskType , workerId , domain ) ; Monitors . recordTaskPollCount ( taskType , domain , polledTasks . size ( ) ) ; return polledTasks ; }
Batch Poll for a task of a certain type .