6 protected $opLog =
'SITE_RECRAWL (Based on SITE_UPDATE)';
10 $siteId = Yii::app()->getRequest()->getPost(
'id');
11 $iterations = Yii::app()->getRequest()->getPost(
'iterations');
12 $cleanup = Yii::app()->getRequest()->getPost(
'cleanup');
13 if (isset($cleanup)) {
20 "description" => null,
24 "httpTimeout" => null,
28 "maxResourceSize" => null,
29 "maxResources" => null,
33 "requestDelay" => null,
42 "processingDelay" => null,
45 "avgSpeedCounter" => null,
46 "maxURLsFromPage" => null,
49 "recrawlPeriod" => null,
50 "recrawlDate" =>
'NOW()',
51 "collectedURLs" => null,
57 $reqFile = tempnam(Yii::app()->getBasePath() .
'/json_temp',
'');
58 $request = fopen($reqFile,
"w");
59 fwrite($request,
$json);
68 $api = Yii::app()->params[
'api'];
69 $path = Yii::app()->getBasePath() .
'/shell/';
70 $cmd =
"sh " . $path .
"rnd_site_update.sh $api $reqFile";
71 $json = shell_exec($cmd);
74 Yii::app()->user->setFlash(
'error1', $this->operation .
' WARNING: ' . $error);
76 Yii::app()->user->setFlash(
'success1', $this->operation .
': SUCCESS');