in 04_EdgeApplication/turbine/logger.py [0:0]
def publish_logs(self, data):
'''
Invoked by the application, it buffers the logs
'''
buffer_len = 0
if self.__log_lock.acquire(False):
self.logs_buffer.append(data)
buffer_len = len(self.logs_buffer)
self.__log_lock.release()
# else: job is running, discard the new data
if buffer_len > 10:
# run the sync job
self.__run_logs_upload_job__()