This commit is contained in:
CHIEFSOFT\ameye
2023-12-07 18:05:20 -05:00
parent efb92948d8
commit 6ded64be76
2 changed files with 9 additions and 3 deletions
+4 -3
View File
@@ -12,6 +12,7 @@
#include "cfg.h"
#include <curl/curl.h>
#include "jobs.h"
#include "bko.h"
long ReviewReminder(CVars in, CVars &out);
long OfferPending(CVars in, CVars &out);
@@ -106,12 +107,12 @@ long sitecrons_calls(CVars in, CVars &out) {
long NotificationSystem(CVars in, CVars &out){
long ret = 0;
const PGresult *res;
//const PGresult *res;
long limit = in["limit"].Long();
logfmt(logINFO, "ENTER NotificationSystem()");
long push_ret = -1;
const PGresult *res = pgsql_query("SELECT count(member_uid) AS mcount,member_uid "
/* " FROM members_notification WHERE status=1 GROUP BY member_uid LIMIT %lu",limit);
" FROM members_notification WHERE status=1 GROUP BY member_uid LIMIT %lu",limit);
if (res != NULL && pgsql_num_rows(res) > 0) {
for (int i = 0, n = pgsql_num_rows(res); i < n; i++) {
map<const char*, const char*>f = pgsql_fetch_assoc(res, i);
@@ -139,7 +140,7 @@ long NotificationSystem(CVars in, CVars &out){
}
} // for loopp
} // main nserach
*/
return ret;
}
+5
View File
@@ -8,6 +8,7 @@ define('WRB_CRONJOB_SIGNUP_ALERT', 773);
define('WRB_CRONJOB_PASTDUE_ALERT',774);
define('WRB_CRONJOB_OFFER_REFUND_ALERT',775);
define('WRB_CRONJOB_PENDOFFER_ALERT',776);
define('WRB_CRONJOB_NOTIFICATIONS', 777) ;
class WrenchCrons extends BaseController
{
@@ -38,6 +39,10 @@ class WrenchCrons extends BaseController
$wrenchboard = new \App\Models\BackendModel();
$out=[];
$in['call_action'] = WRB_CRONJOB_NOTIFICATIONS;
$in['one_limit'] = 10;
$ret['WRB_CRONJOB_NOTIFICATIONS'] = $wrenchboard->wrenchboard_api($in, $out);
log_message('critical', "WrenchCrons ===> 0001");
//$response = []; //json_decode($complete, true);
return $this->response->setJson($out);