def poll(self, classification_filter_operation, classification_list):
        """
            main polling function, 
            makes api calls in following fashion:
            triage-events --> triage-items --> incidents and alerts 
        """
        try:
            #sending data to sentinel
            inc_ids = []
            alert_ids = []
            triage_ids_to_process, max_event_num = self.get_data(classification_filter_operation, classification_list)

            if triage_ids_to_process:
                while len(triage_ids_to_process) > 0:
                    sub_triage_ids = triage_ids_to_process[:50]
                    triage_ids_to_process = triage_ids_to_process[50:]
                    item_data = self.DS_obj.get_triage_items(sub_triage_ids)
                    
                    if item_data:
                        logger.info("total number of items are " + str(len(item_data)))
                        #creating list of ids by alert and incidents
                        alert_triage_items = list(filter(lambda item: item['source']['alert-id'] is not None, item_data))
                        inc_triage_items = list(filter(lambda item: item['source']['incident-id'] is not None, item_data))
                        
                        #getting data from DS and posting to Sentinel
                        if inc_triage_items:
                            inc_ids = [item['source']['incident-id'] for item in inc_triage_items]
                            response_inc = self.DS_obj.get_incidents(inc_ids)
                                
                        if alert_triage_items:
                            alert_ids = [item['source']['alert-id'] for item in alert_triage_items]
                            response_alert = self.DS_obj.get_alerts(alert_ids)
                            
                        if inc_triage_items:
                            self.post_azure(response_inc, inc_triage_items, classification_filter_operation)
                        if alert_triage_items:
                            self.post_azure(response_alert, alert_triage_items, classification_filter_operation)
            else:
                logger.info("No new events found.")
                max_event_num = self.event

            #saving event num for next invocation
            if max_event_num != -1:
                self.date.post_event(max_event_num)
        except Exception:
            logger.exception("Error polling: ")

            main polling function, 
            makes api calls in following fashion:
            triage-events --> triage-items --> incidents and alerts 
        
Solutions/Digital Shadows/Data Connectors/Digital Shadows/DigitalShadowsConnectorAzureFunction/DS_poller.py