Browse Source

每日增量统计bug修复

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

27
control/weibo.php

@ -134,20 +134,29 @@ class weibo extends publicBase {
}
public function ajax_update_cookie() {
$obj = new mWeiboBehavior();
//设置cookie
$cookie = trim($this->get('cookie'));
if (empty($cookie)) $this->ajax_json(false, '参数错误');
if($cookie){
$robj = $obj->initRedis();
$robj->set(_RC_WEIBO_LOGIN_COOKIE, $cookie);
}
//抓取
$type = $this->get('type') + 0;
$obj = new mWeiboBehavior();
$robj = $obj->initRedis();
$robj->set(_RC_WEIBO_LOGIN_COOKIE, $cookie);
if ($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 &");
$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, '设置成功');
$this->ajax_json(true, '333');
}
}

Loading…
Cancel
Save