diff options
| author | David Sommerseth <davids@redhat.com> | 2009-10-20 20:45:16 +0200 |
|---|---|---|
| committer | David Sommerseth <davids@redhat.com> | 2009-10-20 20:45:16 +0200 |
| commit | 1e3a00ef4243b75465c31f04d1bca726bf9a71ac (patch) | |
| tree | 9e421de1bb280ef71db6506d71c45ea20ffa6f61 /server/parser/pgsql.h | |
| parent | b6999e142dd512135ab989e60db89289c6a1eeb9 (diff) | |
| download | rteval-1e3a00ef4243b75465c31f04d1bca726bf9a71ac.tar.gz rteval-1e3a00ef4243b75465c31f04d1bca726bf9a71ac.tar.xz rteval-1e3a00ef4243b75465c31f04d1bca726bf9a71ac.zip | |
Added logic to move parsed files into a specified report directory.
This directory is set in the 'xmlrpc_parser' section, with 'reportdir'.
If this is not set, it defaults to /var/lib/rteval/reports.
Diffstat (limited to 'server/parser/pgsql.h')
| -rw-r--r-- | server/parser/pgsql.h | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/server/parser/pgsql.h b/server/parser/pgsql.h index 219f653..5bb8014 100644 --- a/server/parser/pgsql.h +++ b/server/parser/pgsql.h @@ -26,29 +26,34 @@ #include <eurephia_values.h> #include <parsethread.h> -#define STAT_NEW 0 /**< New, unparsed report in the submission queue */ -#define STAT_ASSIGNED 1 /**< Submission is assigned to a parser */ -#define STAT_INPROG 2 /**< Parsing has started */ -#define STAT_SUCCESS 3 /**< Report parsed successfully */ -#define STAT_UNKNFAIL 4 /**< Unkown failure */ -#define STAT_XMLFAIL 5 /**< Failed to parse the report XML file */ -#define STAT_SYSREG 6 /**< System registration failed */ -#define STAT_GENDB 7 /**< General database error */ -#define STAT_RTEVRUNS 8 /**< Registering rteval run information failed */ -#define STAT_CYCLIC 9 /**< Registering cyclictest results failed */ - -typedef PGconn dbconn; /**< Wrapper definition, for a more generic DB API */ +#define STAT_NEW 0 /**< New, unparsed report in the submission queue */ +#define STAT_ASSIGNED 1 /**< Submission is assigned to a parser */ +#define STAT_INPROG 2 /**< Parsing has started */ +#define STAT_SUCCESS 3 /**< Report parsed successfully */ +#define STAT_UNKNFAIL 4 /**< Unkown failure */ +#define STAT_XMLFAIL 5 /**< Failed to parse the report XML file */ +#define STAT_SYSREG 6 /**< System registration failed */ +#define STAT_RTERIDREG 7 /**< Failed to get a new rterid value for the rteval run */ +#define STAT_GENDB 8 /**< General database error */ +#define STAT_RTEVRUNS 9 /**< Registering rteval run information failed */ +#define STAT_CYCLIC 10 /**< Registering cyclictest results failed */ +#define STAT_REPMOVE 11 /**< Failed to move the report file */ +typedef PGconn dbconn; /**< Wrapper definition, for a more generic DB API */ +/* Generic database function */ void *db_connect(eurephiaVALUES *cfg); void db_disconnect(dbconn *dbc); int db_begin(dbconn *dbc); int db_commit(dbconn *dbc); int db_rollback(dbconn *dbc); + +/* rteval specific database functions */ parseJob_t *db_get_submissionqueue_job(dbconn *dbc, pthread_mutex_t *mtx); int db_update_submissionqueue(dbconn *dbc, unsigned int submid, int status); int db_register_system(dbconn *dbc, xsltStylesheet *xslt, xmlDoc *summaryxml); +int db_get_new_rterid(dbconn *dbc); int db_register_rtevalrun(dbconn *dbc, xsltStylesheet *xslt, xmlDoc *summaryxml, - int syskey, const char *report_fname); + int syskey, int rterid, const char *report_fname); int db_register_cyclictest(dbconn *dbc, xsltStylesheet *xslt, xmlDoc *summaryxml, int rterid); #endif |
