is_locked# is_locked returns whether the lock is locked or unlocked. Definition# 1 2 3def is_locked( self, ) -> bool Examples# Simple 1 2 3 4 5 6 7 8 9def work( self, task, ): single_access_api_url = task.kwargs['single_access_api_url'] lock = self.lock('single_access_api') if lock.is_locked(): self.requeue()