示例#1
0
 protected function loadMigrated()
 {
     $db = $this->db;
     isset($this->sql[$sqlKey = 'load_migrated']) or $this->sql[$sqlKey] = strtr('SELECT * FROM `table`', ['`table`' => $db->escapeIdentifier($this->table)]);
     $this->rawMigrated = $this->db->fetchAll($this->sql[$sqlKey]);
     foreach ($this->rawMigrated as $row) {
         $this->migrated[$row['file']] = $row['run_at'];
     }
     return $this;
 }
示例#2
0
 /**
  * Log a failed job into storage.
  *
  * @param  string $connection
  * @param  string $queue
  * @param  string $payload
  * @return void
  */
 public function log($connection, $queue, $payload)
 {
     $failed_at = date(DateTime::MYSQL_DATETIME);
     $this->db->insertAsDict($this->table, compact('connection', 'queue', 'payload', 'failed_at'));
 }