in aliyun/log/consumer/shard_worker.py [0:0]
def _update_status(self, task_succcess):
if self.consumer_status == ConsumerStatus.SHUTTING_DOWN:
# if no task or previous task suceeds, shutting-down -> shutdown complete
if not self.current_task_exist or task_succcess:
self.consumer_status = ConsumerStatus.SHUTDOWN_COMPLETE
elif self.shutdown:
# always set to shutting down (if flag is set)
self.consumer_status = ConsumerStatus.SHUTTING_DOWN
elif self.consumer_status == ConsumerStatus.INITIALIZING:
# if initing and has task succeed, init -> processing
if task_succcess:
self.consumer_status = ConsumerStatus.PROCESSING