Beispiel #1
0
 private function fetch_end()
 {
     $this->campaign['lastrun'] = $this->campaign['starttime'];
     $this->campaign['lastruntime'] = current_time('timestamp') - $this->campaign['starttime'];
     $this->campaign['starttime'] = '';
     $this->campaign['postscount'] += $this->fetched_posts;
     // Suma los posts procesados
     $this->campaign['lastpostscount'] = $this->fetched_posts;
     //  posts procesados esta vez
     foreach ($this->campaign['campaign_feeds'] as $feed) {
         // Grabo el ultimo hash de cada feed
         @($this->campaign[$feed]['lasthash'] = $this->lasthash[$feed]);
         // paraa chequear duplicados por el hash del permalink original
     }
     if ($this->cfg['nonstatic']) {
         $this->campaign = NoNStatic::ending($this->campaign, $this->fetched_posts);
     }
     WPeMatico::update_campaign($this->campaign_id, $this->campaign);
     //Save Campaign new data
     trigger_error(sprintf(__('Campaign fetched in %1s sec.', WPeMatico::TEXTDOMAIN), $this->campaign['lastruntime']), E_USER_NOTICE);
 }