send money alert
This commit is contained in:
@@ -89,6 +89,11 @@ long alert_email(long mailtype, CVars in, CVars &out) {
|
||||
form.Email("ALERT/alert_daily_stats.mailfile");
|
||||
break;
|
||||
|
||||
case WRB_CRONJOB_PENDINGSM:
|
||||
vars2form(in, form);
|
||||
form.LetStr("email", out["signupreport"]);
|
||||
form.Email("ALERT/alert_smpening.mailfile");
|
||||
break;
|
||||
|
||||
}
|
||||
return 0;
|
||||
|
||||
@@ -26,6 +26,8 @@ long PastDueOffersRefund(CVars in, CVars &out);
|
||||
long NotificationSystem(CVars in, CVars &out);
|
||||
long CronTracker(CVars in, CVars &out);
|
||||
long SendMoneyPending(CVars in, CVars &out);
|
||||
long ProcessGroupJobs(CVars in, CVars &out);
|
||||
|
||||
/*
|
||||
CREATE TABLE cron_jobs (
|
||||
id SERIAL,
|
||||
@@ -110,7 +112,7 @@ long sitecrons_calls(CVars in, CVars &out) {
|
||||
ct["job_type"]="WRB_CRONJOB_GROUPJOBS"; ct["job_type"].set_valid( true );
|
||||
ct["description"]="Job Group Processing"; ct["description"].set_valid( true );
|
||||
CronTracker(ct, co);
|
||||
return 0; //NotificationSystem(in, out);
|
||||
return ProcessGroupJobs(in, out);
|
||||
break;
|
||||
|
||||
}
|
||||
@@ -120,10 +122,19 @@ long sitecrons_calls(CVars in, CVars &out) {
|
||||
}
|
||||
|
||||
long SendMoneyPending(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 ProcessGroupJobs(CVars in, CVars &out){
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
long NotificationSystem(CVars in, CVars &out){
|
||||
long ret = 0;
|
||||
//const PGresult *res;
|
||||
|
||||
Reference in New Issue
Block a user