|
|
@@ -118,7 +118,11 @@ class Fsck(object): |
|
|
|
raise FsckError("Bulk data directory missing (%s)", self.bulkpath) |
|
|
|
with open(self.bulklock, "w") as lockfile: |
|
|
|
if not nilmdb.utils.lock.exclusive_lock(lockfile): |
|
|
|
raise FsckError('database already locked by another process') |
|
|
|
raise FsckError('Database already locked by another process\n' |
|
|
|
'Make sure all other processes that might be ' |
|
|
|
'using the database are stopped.\n' |
|
|
|
'Restarting apache will cause it to unlock ' |
|
|
|
'the db until a request is received.') |
|
|
|
# unlocked immediately |
|
|
|
self.bulk = nilmdb.server.bulkdata.BulkData(self.basepath) |
|
|
|
|
|
|
|