|
|
@ -454,14 +454,13 @@ class DBCheck(Master): |
|
|
|
as sdata from information_schema.tables where TABLE_SCHEMA='" + DB_NAME + "' and TABLE_NAME in('search_hash','search_filelist', 'search_statusreport')" |
|
|
|
as sdata from information_schema.tables where TABLE_SCHEMA='" + DB_NAME + "' and TABLE_NAME in('search_hash','search_filelist', 'search_statusreport')" |
|
|
|
|
|
|
|
|
|
|
|
db_size_limit = float(DB_SIZE_LIMIT) * 1024 |
|
|
|
db_size_limit = float(DB_SIZE_LIMIT) * 1024 |
|
|
|
print db_size_limit |
|
|
|
|
|
|
|
data = self.query(sql) |
|
|
|
data = self.query(sql) |
|
|
|
db_size = data[0][0] |
|
|
|
db_size = data[0][0] |
|
|
|
|
|
|
|
|
|
|
|
if db_size > db_size_limit: |
|
|
|
if db_size > db_size_limit: |
|
|
|
self.delete_db(DB_DEL_LINE) |
|
|
|
self.delete_db(DB_DEL_LINE) |
|
|
|
|
|
|
|
|
|
|
|
print 'db size limit:', int(DB_SIZE_LIMIT) * 1024, db_size |
|
|
|
print 'db size limit:', db_size_limit, db_size |
|
|
|
# self.delete_db(DB_DEL_LINE) |
|
|
|
# self.delete_db(DB_DEL_LINE) |
|
|
|
|
|
|
|
|
|
|
|
def run(self): |
|
|
|
def run(self): |
|
|
|