def getAllJobs(self): s = list() con = None try: con = psycopg2.connect( database='d1s3idai1l2u3d', user='******', password='******', host='ec2-54-197-241-24.compute-1.amazonaws.com', port='5432', sslmode='require') cur = con.cursor() except psycopg2.DatabaseError as e: print('Error %s' % e) sys.exit(1) finally: if con: cur.execute("SELECT job_data::text FROM job") rows = cur.fetchall() for row in rows: pp = str(row[0]) print(pp) s.append(decodeJsonToClass(pp)) con.close() return s
def getAllJobs(self): s = list() con = None try: con = psycopg2.connect( database="d1s3idai1l2u3d", user="******", password="******", host="ec2-54-197-241-24.compute-1.amazonaws.com", port="5432", sslmode="require", ) cur = con.cursor() except psycopg2.DatabaseError as e: print("Error %s" % e) sys.exit(1) finally: if con: cur.execute("SELECT job_data::text FROM job") rows = cur.fetchall() for row in rows: pp = str(row[0]) s.append(decodeJsonToClass(pp)) con.close() return s
def getMatchBoxes(self): s = set() con = None try: con = psycopg2.connect(database='d1s3idai1l2u3d', user='******', password='******', host='ec2-54-197-241-24.compute-1.amazonaws.com', port='5432', sslmode='require') cur = con.cursor() except psycopg2.DatabaseError as e: print ('Error %s' % e) sys.exit(1) finally: if con: cur.execute("SELECT matchbox_data::text FROM matchbox"); rows = cur.fetchall() for row in rows: pp = str(row[0]) print (pp) s.add(decodeJsonToClass(pp)) con.close() return s
def getNewJobs(self): s = list() con = None try: con = psycopg2.connect(database='d1s3idai1l2u3d', user='******', password='******', host='ec2-54-197-241-24.compute-1.amazonaws.com', port='5432', sslmode='require') cur = con.cursor() except psycopg2.DatabaseError as e: print ('Error %s' % e) sys.exit(1) finally: if con: cur.execute("SELECT job_data::text FROM job WHERE job_isprocessed = %s",('f')); rows = cur.fetchall() for row in rows: pp = str(row[0]) print (pp) s.append(decodeJsonToClass(pp)) cur.execute("UPDATE job SET job_isprocessed=%s",('t')); con.close() return s
from CustomClassJson import decodeJsonToClass from JobDescNode import JobDescNode from Matcher import Matcher from Scorer import Scorer from Facade import Facade from CustomClassJson import encodeClassToJson from CustomClassJson import decodeJsonToClass from ResumeProcessor import ResumeProcessor import json s = list() con = None try: con = psycopg2.connect(database='d1s3idai1l2u3d', user='******', password='******', host='ec2-54-197-241-24.compute-1.amazonaws.com', port='5432', sslmode='require') cur = con.cursor() except psycopg2.DatabaseError as e: print ('Error %s' % e) sys.exit(1) finally: if con: cur.execute("SELECT resume_data::text FROM resume WHERE resume_isprocessed = %s",('f')); rows = cur.fetchall() for row in rows: pp = str(row[0]) print(pp) s.append(decodeJsonToClass(pp)) cur.execute("UPDATE resume SET resume_isprocessed=%s",('t')); con.commit() con.close()
from CustomClassJson import encodeClassToJson from CustomClassJson import decodeJsonToClass from ResumeProcessor import ResumeProcessor import json s = list() con = None try: con = psycopg2.connect(database='d1s3idai1l2u3d', user='******', password='******', host='ec2-54-197-241-24.compute-1.amazonaws.com', port='5432', sslmode='require') cur = con.cursor() except psycopg2.DatabaseError as e: print('Error %s' % e) sys.exit(1) finally: if con: cur.execute( "SELECT resume_data::text FROM resume WHERE resume_isprocessed = %s", ('f')) rows = cur.fetchall() for row in rows: pp = str(row[0]) print(pp) s.append(decodeJsonToClass(pp)) cur.execute("UPDATE resume SET resume_isprocessed=%s", ('t')) con.commit() con.close()