cur.execute("INSERT INTO jenkins_build(jenkins_job_id, jenkins_build_number, build_start, build_end, status) VALUES(%s, %s, '%s', '%s', '%s') RETURNING id" % (db_id, number, start, end, status))
except psycopg2.DatabaseError as e:
cur.execute("ROLLBACK TO a") # have to rollback after failed command
- logger.info("INSERT INTO jenkins_build(jenkins_job_id, jenkins_build_number, build_start, build_end, status) VALUES(%s, %s, '%s', '%s', '%s') RETURNING id" % (db_id, number, start, end, status))
+ logger.debug("INSERT INTO jenkins_build(jenkins_job_id, jenkins_build_number, build_start, build_end, status) VALUES(%s, %s, '%s', '%s', '%s') RETURNING id" % (db_id, number, start, end, status))
return cur.fetchone()[0]
def db_update_build(con, db_id, end, status):
cur.execute("UPDATE jenkins_build SET build_end = '%s', status = '%s' WHERE id = %s RETURNING id" % (db_id, end, status))
except psycopg2.DatabaseError as e:
cur.execute("ROLLBACK TO a") # have to rollback after failed command
- logger.info("UPDATE jenkins_build SET build_end = '%s', status = '%s' WHERE id = %s RETURNING id" % (db_id, end, status))
+ logger.debug("UPDATE jenkins_build SET build_end = '%s', status = '%s' WHERE id = %s RETURNING id" % (db_id, end, status))
return cur.fetchone()[0]
def db_add_origin(con, origin):