fix bug
This commit is contained in:
@@ -12,6 +12,7 @@
|
|||||||
#include "cfg.h"
|
#include "cfg.h"
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
#include "jobs.h"
|
#include "jobs.h"
|
||||||
|
#include "bko.h"
|
||||||
|
|
||||||
long ReviewReminder(CVars in, CVars &out);
|
long ReviewReminder(CVars in, CVars &out);
|
||||||
long OfferPending(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 NotificationSystem(CVars in, CVars &out){
|
||||||
long ret = 0;
|
long ret = 0;
|
||||||
const PGresult *res;
|
//const PGresult *res;
|
||||||
long limit = in["limit"].Long();
|
long limit = in["limit"].Long();
|
||||||
logfmt(logINFO, "ENTER NotificationSystem()");
|
logfmt(logINFO, "ENTER NotificationSystem()");
|
||||||
long push_ret = -1;
|
long push_ret = -1;
|
||||||
const PGresult *res = pgsql_query("SELECT count(member_uid) AS mcount,member_uid "
|
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) {
|
if (res != NULL && pgsql_num_rows(res) > 0) {
|
||||||
for (int i = 0, n = pgsql_num_rows(res); i < n; i++) {
|
for (int i = 0, n = pgsql_num_rows(res); i < n; i++) {
|
||||||
map<const char*, const char*>f = pgsql_fetch_assoc(res, i);
|
map<const char*, const char*>f = pgsql_fetch_assoc(res, i);
|
||||||
@@ -139,7 +140,7 @@ long NotificationSystem(CVars in, CVars &out){
|
|||||||
}
|
}
|
||||||
} // for loopp
|
} // for loopp
|
||||||
} // main nserach
|
} // main nserach
|
||||||
*/
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ define('WRB_CRONJOB_SIGNUP_ALERT', 773);
|
|||||||
define('WRB_CRONJOB_PASTDUE_ALERT',774);
|
define('WRB_CRONJOB_PASTDUE_ALERT',774);
|
||||||
define('WRB_CRONJOB_OFFER_REFUND_ALERT',775);
|
define('WRB_CRONJOB_OFFER_REFUND_ALERT',775);
|
||||||
define('WRB_CRONJOB_PENDOFFER_ALERT',776);
|
define('WRB_CRONJOB_PENDOFFER_ALERT',776);
|
||||||
|
define('WRB_CRONJOB_NOTIFICATIONS', 777) ;
|
||||||
class WrenchCrons extends BaseController
|
class WrenchCrons extends BaseController
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -38,6 +39,10 @@ class WrenchCrons extends BaseController
|
|||||||
$wrenchboard = new \App\Models\BackendModel();
|
$wrenchboard = new \App\Models\BackendModel();
|
||||||
$out=[];
|
$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");
|
log_message('critical', "WrenchCrons ===> 0001");
|
||||||
//$response = []; //json_decode($complete, true);
|
//$response = []; //json_decode($complete, true);
|
||||||
return $this->response->setJson($out);
|
return $this->response->setJson($out);
|
||||||
|
|||||||
Reference in New Issue
Block a user