This commit is contained in:
2022-07-18 18:36:28 -04:00
parent 61bb2a5800
commit 01c0d4a417
2 changed files with 14 additions and 7 deletions
+6 -3
View File
@@ -97,13 +97,14 @@ long sitecrons_calls(CVars in, CVars &out) {
}
long CronTracker(CVars in, CVars &out){
long ret = PHP_API_BAD_PARAM;
long ret = 0;
const PGresult *res;
try {
REQ_STRING(in, "job_type", 2, 149, "(.*)");
REQ_STRING(in, "description", 2, 149, "(.*)");
if ( load_db_record(out, "SELECT id AS cron_id FROM cron_jobs WHERE job_type ='%s' ", in["job_type"].c_str())> 0){
if ( load_db_record(out, "SELECT id AS cron_id,active FROM cron_jobs WHERE job_type ='%s' ", in["job_type"].c_str())> 0){
ret = out["active"].Long();
res = pgsql_query("UPDATE cron_jobs SET updated=now() WHERE id = %lu", out["cron_id"].Long());
}
else{
@@ -224,8 +225,10 @@ long SignUpStats(CVars in, CVars &out) {
load_db_record(out, "SELECT count(id) AS today_signup FROM members WHERE added::date = now()::date");
load_db_record(out, "SELECT count(id) AS today_pending_signup FROM members_pending WHERE added::date = now()::date");
load_db_record(out, "SELECT TO_CHAR(NOW() :: DATE, 'Day Mon dd, yyyy') AS report_date");
load_db_record(out, "SELECT count(*) AS total_task_interest FROM members_offer_interest WHERE added::date = now()::date");
load_db_record(out, "SELECT count(id) AS total_active_public_jobs FROM members_jobs_offer WHERE status=1 AND public_view= 1 AND expire> now()");
load_db_record(out, "SELECT count(*) AS total_login FROM members_session WHERE created::date=now()::date");
in = out;