This commit is contained in:
CHIEFSOFT\ameye
2024-09-23 05:12:50 -04:00
parent 659109624c
commit 841cab75eb
7 changed files with 211 additions and 177 deletions
+18
View File
@@ -31,6 +31,8 @@ long ProcessGroupJobs(CVars in, CVars &out);
long ProcessTransferJobs(CVars in, CVars &out);
long ScheduleTransferJobs(CVars in, CVars &out);
long TestNotificationsJobs(CVars in, CVars &out);
long ProcessExpiredOffers(CVars in, CVars &out);
/*
CREATE TABLE cron_jobs (
id SERIAL,
@@ -139,12 +141,28 @@ long sitecrons_calls(CVars in, CVars &out) {
return ProcessTransferJobs(in, out);
break;
case WRB_CRONJOB_AUTO_OFFEREXPIRE:
ct["job_type"]="WRB_CRONJOB_AUTO_OFFEREXPIRE"; ct["job_type"].set_valid( true );
ct["description"]="Process Transfer Expired Offers"; ct["description"].set_valid( true );
CronTracker(ct, co);
return ProcessExpiredOffers(in, out);
break;
}
logfmt(logINFO, "/sitecrons_calls()");
return ret;
}
long ProcessExpiredOffers(CVars in, CVars &out){
// if ( load_db_record(out, "SELECT count(uid) AS pending_count FROM money_transfer WHERE status =1 AND completed IS NULL ")> 0){
// if ( out["pending_count"].Long() > 0 ){
// alert_email(WRB_CRONJOB_PENDINGSM,out, out);
// }
// }
return 0;
}
long ProcessTransferJobs(CVars in, CVars &out){
// if ( load_db_record(out, "SELECT count(uid) AS pending_count FROM money_transfer WHERE status =1 AND completed IS NULL ")> 0){