mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-11-07 23:01:58 +01:00
Fixed started column for import jobs
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
parent
df339cb75a
commit
8685574ede
@ -110,7 +110,7 @@
|
||||
#define SQL_PREPARED_STMT_UPDATE_METADATA_REFERENCE "UPDATE " SQL_METADATA_TABLE " SET reference=? WHERE message_id=? AND reference=''"
|
||||
#define SQL_PREPARED_STMT_GET_GUI_IMPORT_JOBS "SELECT id, type, username, password, server FROM " SQL_IMPORT_TABLE " WHERE started=0 ORDER BY id LIMIT 0,1"
|
||||
#define SQL_PREPARED_STMT_INSERT_FOLDER_MESSAGE "INSERT INTO " SQL_FOLDER_MESSAGE_TABLE " (`folder_id`, `id`) VALUES(?,?)"
|
||||
#define SQL_PREPARED_STMT_UPDATE_IMPORT_TABLE "UPDATE " SQL_IMPORT_TABLE " SET status=?, imported=? WHERE id=?"
|
||||
#define SQL_PREPARED_STMT_UPDATE_IMPORT_TABLE "UPDATE " SQL_IMPORT_TABLE " SET started=?, status=?, imported=? WHERE id=?"
|
||||
|
||||
/* Error codes */
|
||||
|
||||
|
@ -156,13 +156,14 @@ int import_message(struct session_data *sdata, struct data *data, struct config
|
||||
|
||||
|
||||
int update_import_table(struct session_data *sdata, struct data *data) {
|
||||
int ret=ERR, status=2;
|
||||
int ret=ERR, status=2, started=1;
|
||||
struct sql sql;
|
||||
|
||||
if(prepare_sql_statement(sdata, &sql, SQL_PREPARED_STMT_UPDATE_IMPORT_TABLE) == ERR) return ret;
|
||||
|
||||
p_bind_init(&sql);
|
||||
|
||||
sql.sql[sql.pos] = (char *)&(started); sql.type[sql.pos] = TYPE_LONG; sql.pos++;
|
||||
sql.sql[sql.pos] = (char *)&(status); sql.type[sql.pos] = TYPE_LONG; sql.pos++;
|
||||
sql.sql[sql.pos] = (char *)&(data->import->tot_msgs); sql.type[sql.pos] = TYPE_LONG; sql.pos++;
|
||||
sql.sql[sql.pos] = (char *)&(data->import->table_id); sql.type[sql.pos] = TYPE_LONG; sql.pos++;
|
||||
|
Loading…
Reference in New Issue
Block a user