def _init_jobs_table():
    """Initialise the "jobs" table in the db."""
    _jobs_table = sqlalchemy.Table(
        'jobs', _METADATA,
        sqlalchemy.Column('job_id', sqlalchemy.UnicodeText, primary_key=True),
        sqlalchemy.Column('job_type', sqlalchemy.UnicodeText),
        sqlalchemy.Column('status', sqlalchemy.UnicodeText, index=True),
        sqlalchemy.Column('data', sqlalchemy.UnicodeText),
        sqlalchemy.Column('error', sqlalchemy.UnicodeText),
        sqlalchemy.Column('requested_timestamp', sqlalchemy.DateTime),
        sqlalchemy.Column('finished_timestamp', sqlalchemy.DateTime),
        sqlalchemy.Column('sent_data', sqlalchemy.UnicodeText),
        # Callback URL:
        sqlalchemy.Column('result_url', sqlalchemy.UnicodeText),
        # CKAN API key:
        sqlalchemy.Column('api_key', sqlalchemy.UnicodeText),
        # Key to administer job:
        sqlalchemy.Column('job_key', sqlalchemy.UnicodeText),
        )
    return _jobs_table
def _init_jobs_table ( ) : _jobs_table = sqlalchemy . Table ( 'jobs' , _METADATA , sqlalchemy . Column ( 'job_id' , sqlalchemy . UnicodeText , primary_key = True ) , sqlalchemy . Column ( 'job_type' , sqlalchemy . UnicodeText ) , sqlalchemy . Column ( 'status' , sqlalchemy . UnicodeText , index = True ) , sqlalchemy . Column ( 'data' , sqlalchemy . UnicodeText ) , sqlalchemy . Column ( 'error' , sqlalchemy . UnicodeText ) , sqlalchemy . Column ( 'requested_timestamp' , sqlalchemy . DateTime ) , sqlalchemy . Column ( 'finished_timestamp' , sqlalchemy . DateTime ) , sqlalchemy . Column ( 'sent_data' , sqlalchemy . UnicodeText ) , sqlalchemy . Column ( 'result_url' , sqlalchemy . UnicodeText ) , sqlalchemy . Column ( 'api_key' , sqlalchemy . UnicodeText ) , sqlalchemy . Column ( 'job_key' , sqlalchemy . UnicodeText ) , ) return _jobs_table
Initialise the "jobs" table in the db.