f5cece60b38bd8c2cfd57acf2abb972d66edb6d9 hiram Fri Apr 24 11:43:36 2026 -0700 rename doneStatus to just status and correctly set status codes refs #31811 diff --git src/hg/utils/otto/userRequests/ottoRequest.py src/hg/utils/otto/userRequests/ottoRequest.py index dca2df5f3ef..e29b9bc9d87 100755 --- src/hg/utils/otto/userRequests/ottoRequest.py +++ src/hg/utils/otto/userRequests/ottoRequest.py @@ -112,55 +112,55 @@ conf = parseHgConf(args.conf) dbName = conf.get('central.db') if not dbName: sys.exit("Error: central.db not defined in config") table = conf.get('ottoTable', 'ottoRequest') notifyEmail = conf.get('chainFileRequestEmail') if not notifyEmail: sys.exit("Error: chainFileRequestEmail not defined in config") # find pending requests sql = (f"SELECT id, requestType, fromDb, toDb, email, comment, " - f"requestTime FROM {table} WHERE doneStatus = 0") + f"requestTime FROM {table} WHERE status = 0") pending = hgsqlQuery(dbName, sql) if not pending: return # nothing to do -- silent for cron for req in pending: subject = f"ottoRequest #{req['id']}: {req['requestType']} pending" body = ( f"##################################################\n" f"Pending {req['requestType']} request #{req['id']}\n" f"\n" f" From: {req['fromDb']}\n" f" To: {req['toDb']}\n" f" Email: {req['email']}\n" f" Comment: {req['comment']}\n" f" Time: {req['requestTime']}\n" f"##################################################\n" f"testing ottoRequest watch cron job\n" f"##################################################\n" ) if sendMail(notifyEmail, subject, body, fromAddr=notifyEmail): # print(f"Notified {notifyEmail} about request #{req['id']}") hgsqlUpdate(dbName, - f"UPDATE {table} SET doneStatus = 1" + f"UPDATE {table} SET status = 1" f" WHERE id = {req['id']}") else: print(f"Failed to notify about request #{req['id']}", file=sys.stderr) # send acknowledgment to the requesting user userEmail = req.get('email', '') if userEmail: userSubject = (f"UCSC Genome Browser: your {req['requestType']}" f" request has been received") userBody = ( f"Your request for chain/liftOver files has been received\n" f"and is being processed.\n" f"\n" f"Request details:\n"