/** * Insert a single job into the queue. * @return bool true on success */ function insert() { $fields = $this->insertFields(); $dbw = wfGetDB(DB_MASTER); if ($this->removeDuplicates) { $res = $dbw->select('job', array('1'), $fields, __METHOD__); if ($dbw->numRows($res)) { return true; } } wfIncrStats('job-insert'); Wikia::informJobQueue(); return $dbw->insert('job', $fields, __METHOD__); }