code: def acquire_lock(self):
          
          key = '%s_lock' % self.scheduler_key
          now = time.time()
          expires = int(self._interval) + 10
          self._lock_acquired = self.connection.set(
                  key, now, ex=expires, nx=True)
          return self._lock_acquired
docs: Acquire lock before scheduling jobs to prevent another scheduler
          from scheduling jobs at the same time.
  
          This function returns True if a lock is acquired. False otherwise.