18 #ifndef DATABASE_H_INCLUDE 19 #define DATABASE_H_INCLUDE 29 #define PQget(db_result, row, col) \ 30 PQgetvalue(db_result, row, PQfnumber(db_result, col)) void database_reset_queue(scheduler_t *scheduler)
Resets any jobs in the job queue that are not completed.
void email_init(scheduler_t *scheduler)
Loads information about the email that will be sent for job notifications.
void database_init(scheduler_t *scheduler)
void database_update_event(scheduler_t *scheduler, void *unused)
Checks the job queue for any new entries.
void database_update_job(scheduler_t *scheduler, job_t *job, job_status status)
Change the status of a job in the database.
void database_job_log(int j_id, char *log_name)
Enters the name of the log file for a job into the database.
PGresult * database_exec(scheduler_t *scheduler, const char *sql)
Executes an sql statement for the scheduler.
void database_exec_event(scheduler_t *scheduler, char *sql)
PGconn * db_conn
The connection to Database.
void database_job_processed(int j_id, int num)
Updates the number of items that a job queue entry has processed.
const char * jobsql_failed
void database_job_priority(scheduler_t *scheduler, job_t *job, int priority)
Changes the priority of a job queue entry in the database.
Header file for the scheduler.
char * get_email_command(scheduler_t *scheduler, char *user_email)
Build command to run to send email.