private function buildCruiseQuery()
 {
     $project = $this->validateProject(Input::get('project'));
     return $project ? Cruises::whereProject($project) : Cruises::getQuery();
 }
 public static function crawl($project = Project::TRAVELOCITY, $workerNum = 1)
 {
     Cruises::whereProject($project)->delete();
     system("ps aux | grep 'run.py -p " . $project . "' | grep -v grep | awk '{print \$2}' | xargs kill -9");
     system('python ' . config('app.crawler_path') . "/cruise/run.py -p {$project} -n {$workerNum} >" . storage_path('logs') . "/cruises/{$project}_" . date('Y-m-d') . '.log');
 }