updated
This commit is contained in:
@@ -161,7 +161,7 @@ long ScheduleTransferJobs(CVars in, CVars &out){
|
|||||||
try {
|
try {
|
||||||
out["total_record"] = "0";
|
out["total_record"] = "0";
|
||||||
const PGresult *res;
|
const PGresult *res;
|
||||||
res = pgsql_query("SELECT initiatingamount, status, added,proc FROM money_transfer WHERE added > (now() - interval '3000 minutes') AND status = 1 AND completed IS NULL ORDER BY id DESC LIMIT 100");
|
res = pgsql_query("SELECT id, uid, initiatingamount, status, added,proc FROM money_transfer WHERE added > (now() - interval '3000 minutes') AND status = 1 AND completed IS NULL ORDER BY id DESC LIMIT 100");
|
||||||
|
|
||||||
if (res != NULL && pgsql_num_rows(res) > 0) {
|
if (res != NULL && pgsql_num_rows(res) > 0) {
|
||||||
out["total_record"] = pgsql_num_rows(res);
|
out["total_record"] = pgsql_num_rows(res);
|
||||||
@@ -171,7 +171,7 @@ long ScheduleTransferJobs(CVars in, CVars &out){
|
|||||||
if (f.empty()) continue;
|
if (f.empty()) continue;
|
||||||
CVars rec;
|
CVars rec;
|
||||||
map_to_cvars(f, rec);
|
map_to_cvars(f, rec);
|
||||||
pgsql_query("UPDATE money_transfer SET proc= 100 "
|
pgsql_query("UPDATE money_transfer SET proc= 100, updated = now() "
|
||||||
" WHERE proc = 0 AND id = %lu AND uid = '%s'", rec["id"].Long(),rec["uid"].c_str()); // move the status so no retry
|
" WHERE proc = 0 AND id = %lu AND uid = '%s'", rec["id"].Long(),rec["uid"].c_str()); // move the status so no retry
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user