Exemplo n.º 1
0
 def get_creation_lock(self, key):
     return file_synchronizer(
             identifier="dbmcontainer/funclock/%s/%s" % (
                 self.namespace, key
             ),
             lock_dir=self.lock_dir
             )
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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
Exemplo n.º 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)
Exemplo n.º 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
Exemplo n.º 7
0
 def get_access_lock(self):
     return file_synchronizer(identifier=self.namespace,
                              lock_dir=self.lock_dir)
Exemplo n.º 8
0
 def get_creation_lock(self, key):
     return file_synchronizer(
         identifier = "mongodb_gridfs_container/funclock/%s" % self.namespace,
         lock_dir = self.lock_dir)
Exemplo n.º 9
0
 def get_creation_lock(self, key):
     return file_synchronizer(
         identifier="mongodb_gridfs_container/funclock/%s" % self.namespace,
         lock_dir=self.lock_dir)