Browse Source

每日增量统计bug修复

pull/60/head
pengda 5 days ago
parent
commit
5c592ecd80
  1. 25
      control/weibo.php

25
control/weibo.php

@ -134,20 +134,29 @@ class weibo extends publicBase {
} }
public function ajax_update_cookie() { public function ajax_update_cookie() {
$cookie = trim($this->get('cookie'));
if (empty($cookie)) $this->ajax_json(false, '参数错误');
$type = $this->get('type') + 0;
$obj = new mWeiboBehavior(); $obj = new mWeiboBehavior();
//设置cookie
$cookie = trim($this->get('cookie'));
if($cookie){
$robj = $obj->initRedis(); $robj = $obj->initRedis();
$robj->set(_RC_WEIBO_LOGIN_COOKIE, $cookie); $robj->set(_RC_WEIBO_LOGIN_COOKIE, $cookie);
}
if ($type == 0) { //抓取
$type = $this->get('type') + 0;
if ($type) {
shell_exec("nohup /usr/bin/php /data1/www/zhishiku.yizherenxin.cn/queue/crontab/spider_behavior_data.php > /dev/null 2>&1 &"); shell_exec("nohup /usr/bin/php /data1/www/zhishiku.yizherenxin.cn/queue/crontab/spider_behavior_data.php > /dev/null 2>&1 &");
$this->ajax_json(true, '设置成功'); $this->ajax_json(true, '111');
}
//统计某日期增量
$date = trim($this->get('date'));
if($date){
shell_exec("nohup /usr/bin/php /data1/www/zhishiku.yizherenxin.cn/queue/crontab/spider_behavior_delta.php {$date} > /dev/null 2>&1 &");
$this->ajax_json(true, '222');
} }
shell_exec("nohup /usr/bin/php /data1/www/zhishiku.yizherenxin.cn/queue/crontab/spider_behavior_delta.php > /dev/null 2>&1 &"); $this->ajax_json(true, '333');
$this->ajax_json(true, '设置成功');
} }
} }

Loading…
Cancel
Save