def new_state(jobid):
    sql = """
INSERT INTO
	myemsl.ingest_state(host,jobid)
VALUES
	(%(host)s,%(jobid)i);
"""
    params = {'jobid': int(jobid), 'host': str(gethostname())}
    do_sql(sql, False, myemsl_schema_versions=['1.5'], params=params)
Exemple #2
0
def new_state(jobid):
	sql = """
INSERT INTO
	myemsl.ingest_state(host,jobid)
VALUES
	(%(host)s,%(jobid)i);
"""
	params= {
		'jobid':int(jobid),
		'host':str(gethostname())
	}
	do_sql(sql, False, myemsl_schema_versions=['1.5'], params=params)
Exemple #3
0
def _update_int(jobid, value, column):
	sql = """
UPDATE
	myemsl.ingest_state
SET
	%(column)s = %%(value)i
WHERE
	jobid = %%(jobid)i and
	host = %%(host)s;
"""%{'column':column}
	params = {
		'value': int(value),
		'jobid':int(jobid),
		'host':str(gethostname())
	}
	do_sql(sql, False, myemsl_schema_versions=['1.5'], params=params)
def update_state(jobid, step, status, message, host=None):
    sql = """
UPDATE
	myemsl.ingest_state
SET
	step = %(step)i,
	status = %(status)s,
	message = %(message)s
WHERE
	jobid = %(jobid)i and
	host = %(host)s;
"""
    if host == None:
        host = str(gethostname())
    params = {
        'step': int(step),
        'status': str(status),
        'message': str(message),
        'jobid': int(jobid),
        'host': host
    }
    do_sql(sql, False, myemsl_schema_versions=['1.5'], params=params)
Exemple #5
0
def update_state(jobid, step, status, message, host=None):
	sql = """
UPDATE
	myemsl.ingest_state
SET
	step = %(step)i,
	status = %(status)s,
	message = %(message)s
WHERE
	jobid = %(jobid)i and
	host = %(host)s;
"""
	if host == None:
		host = str(gethostname())
	params= {
		'step':int(step),
		'status':str(status),
		'message':str(message),
		'jobid':int(jobid),
		'host':host
	}
	do_sql(sql, False, myemsl_schema_versions=['1.5'], params=params)