Example #1
0
 def get_creation_lock(self, key):
     return file_synchronizer(
             identifier="dbmcontainer/funclock/%s/%s" % (
                 self.namespace, key
             ),
             lock_dir=self.lock_dir
             )
Example #2
0
 def get_creation_lock(self, key):
     """@TODO - stop hitting filesystem for this...
     I think mongo can properly avoid dog piling for us.
     """
     return file_synchronizer(
         identifier = "mongodb_container/funclock/%s" % self.namespace,
         lock_dir = self.lock_dir)
Example #3
0
 def get_creation_lock(self, key):
     """
     Setup creation lock.
     """
     identifier = u'/'.join(('rediscontainer', 'funclock',
                             self.namespace, key))
     return file_synchronizer(identifier=identifier, lock_dir=self.lock_dir)
Example #4
0
 def get_creation_lock(self, key):
     if self._use_file_lock:
         return file_synchronizer(
             identifier = "mongodb_container/funclock/%s" % self.namespace,
             lock_dir = self.lock_dir)
     else:
         return null_synchronizer
Example #5
0
 def get_creation_lock(self, key):
     """@TODO - stop hitting filesystem for this...
     I think mongo can properly avoid dog piling for us.
     """
     return file_synchronizer(
         identifier = "mongodb_container/funclock/%s" % self.namespace,
         lock_dir = self.lock_dir)
Example #6
0
 def get_creation_lock(self, key):
     if self._use_file_lock:
         return file_synchronizer(
             identifier="mongodb_container/funclock/%s" % self.namespace,
             lock_dir=self.lock_dir)
     else:
         return null_synchronizer
Example #7
0
 def get_access_lock(self):
     return file_synchronizer(identifier=self.namespace,
                              lock_dir=self.lock_dir)
 def get_creation_lock(self, key):
     return file_synchronizer(
         identifier = "mongodb_gridfs_container/funclock/%s" % self.namespace,
         lock_dir = self.lock_dir)
 def get_creation_lock(self, key):
     return file_synchronizer(
         identifier="mongodb_gridfs_container/funclock/%s" % self.namespace,
         lock_dir=self.lock_dir)