<?php
if (substr(PHP_SAPI_NAME(), 0, 3) !== 'cli') {
    die("The program runs only in CLI mode!");
}
$sid = $lid = 1;
include_once dirname(__FILE__) . "/crontab.inc.php";
include_once dirname(__FILE__) . "/../com.php";
set_time_limit(0);
$minute = date('i');
$now = time();
//长耗时任务每分钟出一个
if(oo::commonOprRedis('statistics')->exists(okeys::longTimeTask())){
   $jsonData= oo::commonOprRedis('statistics')->rPop(okeys::longTimeTask());
   $data = json_decode($jsonData,true);
   if($data['do']==1){
       //活动上线推送
       //oo::commonOprModel("activitynew")->actOnlneFasebasePush($data['arg'][0]);
   }else if($data['do']==2){
       //锦标赛发奖推送
       //oo::commonOprModel("activitynew")->sendRankRewardFasebasePush($data['arg'][0],$data['arg'][1]);
   }
   oo::logs()->commlog($data,'crontab/longTask.log');
}