*** empty log message ***

svn path=/trunk/boinc/; revision=2373
This commit is contained in:
Karl Chen 2003-09-28 09:22:33 +00:00
parent a1669921eb
commit 856593ce4e
1 changed files with 25 additions and 0 deletions

25
tools/dbcheck_files_exist Executable file
View File

@ -0,0 +1,25 @@
#!/usr/bin/env python
import os, re, boinc_path_config
from Boinc import database, db_mid, boinc_db
def get_file_path(wu):
return re.search('<name>(.*)</name>',wu.xml_doc).group(1)
database.connect()
print "Checking for missing input files ...\n"
for (ss_name,server_state) in [
("UNSENT",boinc_db.RESULT_SERVER_STATE_UNSENT),
("IN_PROGRESS",boinc_db.RESULT_SERVER_STATE_IN_PROGRESS)]:
print "=== %s ===" %ss_name
count_total = 0
count_errors = 0
for result in database.Results.iterate(server_state=server_state):
file = get_file_path(result.workunit)
if not os.path.exists(file):
print result, " file %s doesn't exist"%file
count_errors += 1
count_total += 1
print "Total: %d/%d errors/results\n" %(count_errors,count_total)