def release(self, force=False):
		"""Release an exclusive lock on this integration task.
		
		Unless forcing, if we are not the current owners of the lock a Locked exception will be raised.
		"""
		
		D = self.__class__
		collection = self.get_collection()
		identity = self.Lock()
		
		query = D.id == self
		
		if not force:
			query &= D.lock.instance == identity.instance
		
		previous = collection.find_one_and_update(query, {'$unset': {~D.lock: True}}, {~D.lock: True})
		
		if previous is None:
			lock = getattr(self.find_one(self, projection={~D.lock: True}), 'lock', None)
			raise self.Locked("Unable to release lock.", lock)
		
		lock = self.Lock.from_mongo(previous[~D.lock])
		
		if lock and lock.expires <= identity.time:
			lock.expired(self)
		
		identity.released(self, force)
Release an exclusive lock on this integration task.
		
		Unless forcing, if we are not the current owners of the lock a Locked exception will be raised.