new cron jons
This commit is contained in:
@@ -28,6 +28,9 @@ long CronTracker(CVars in, CVars &out);
|
||||
long SendMoneyPending(CVars in, CVars &out);
|
||||
long ProcessGroupJobs(CVars in, CVars &out);
|
||||
|
||||
long ProcessTransferJobs(CVars in, CVars &out);
|
||||
long ScheduleTransferJobs(CVars in, CVars &out);
|
||||
long TestNotificationsJobs(CVars in, CVars &out);
|
||||
/*
|
||||
CREATE TABLE cron_jobs (
|
||||
id SERIAL,
|
||||
@@ -109,10 +112,31 @@ long sitecrons_calls(CVars in, CVars &out) {
|
||||
break;
|
||||
|
||||
case WRB_CRONJOB_GROUPJOBS:
|
||||
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 ProcessGroupJobs(in, 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 ProcessGroupJobs(in, out);
|
||||
break;
|
||||
|
||||
case WRB_CRONJOB_TESTNOTIFICATIONS:
|
||||
ct["job_type"]="WRB_CRONJOB_TESTNOTIFICATIONS"; ct["job_type"].set_valid( true );
|
||||
ct["description"]="Test Notifications Processing"; ct["description"].set_valid( true );
|
||||
CronTracker(ct, co);
|
||||
return TestNotificationsJobs(in, out);
|
||||
break;
|
||||
|
||||
case WRB_CRONJOB_SCHEULETRANSFER:
|
||||
ct["job_type"]="WRB_CRONJOB_SCHEULETRANSFER"; ct["job_type"].set_valid( true );
|
||||
ct["description"]="Schedule Transfer Processing"; ct["description"].set_valid( true );
|
||||
CronTracker(ct, co);
|
||||
return ScheduleTransferJobs(in, out);
|
||||
break;
|
||||
|
||||
case WRB_CRONJOB_PROCESSTRANSFER:
|
||||
ct["job_type"]="WRB_CRONJOB_PROCESSTRANSFER"; ct["job_type"].set_valid( true );
|
||||
ct["description"]="Process Transfer Processing"; ct["description"].set_valid( true );
|
||||
CronTracker(ct, co);
|
||||
return ProcessTransferJobs(in, out);
|
||||
break;
|
||||
|
||||
}
|
||||
@@ -121,6 +145,34 @@ long sitecrons_calls(CVars in, CVars &out) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
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){
|
||||
// if ( out["pending_count"].Long() > 0 ){
|
||||
// alert_email(WRB_CRONJOB_PENDINGSM,out, out);
|
||||
// }
|
||||
// }
|
||||
return 0;
|
||||
}
|
||||
|
||||
long ScheduleTransferJobs(CVars in, CVars &out){
|
||||
// if ( load_db_record(out, "SELECT initiatingamount, status, added,proc FROM money_transfer WHERE added > (now() - interval '3000 minutes') AND status = 0 ORDER BY id DESC LIMIT 100 ")> 0){
|
||||
// if ( out["pending_count"].Long() > 0 ){
|
||||
// alert_email(WRB_CRONJOB_PENDINGSM,out, out);
|
||||
// }
|
||||
// }
|
||||
return 0;
|
||||
}
|
||||
|
||||
long TestNotificationsJobs(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 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 ){
|
||||
|
||||
Reference in New Issue
Block a user