Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)
Get a bucket key to compact.  If none are available, returns
None.  This uses a configured lock to ensure that the bucket
key is popped off the sorted set in an atomic fashion.

:param now: The current time, as a float.  Used to ensure the
            bucket key has been aged sufficiently to be
            quiescent.

:returns: A bucket key ready for compaction, or None if no
          bucket keys are available or none have aged(more...)

src/t/u/turnstile-HEAD/tests/unit/test_compactor.py   turnstile(Download)
        gbtbl = compactor.GetBucketKeyByLock({}, db)
 
        result = gbtbl.get(1000000.0)
 
        self.assertEqual(result, None)
        gbtbl = compactor.GetBucketKeyByLock({}, db)
 
        result = gbtbl.get(1000000.0)
 
        self.assertEqual(result, 'bucket1')