Resolve "Warranty Serial Upload Improvements" #1635

Merged
korina.cordero merged 6 commits from 708-warranty-serial-upload-improvements into master 2022-11-10 06:45:47 +00:00
Showing only changes of commit 815c25a894 - Show all commits

View file

@ -392,12 +392,18 @@ class LoadWarrantySerialCommand extends Command
{
// prepared statement
$db = $this->em->getConnection();
// lock the warranty serial queue table
$db->exec('LOCK TABLES warranty_serial_queue WRITE;');
$delete_stmt = $db->prepare('DELETE FROM warranty_serial_queue
WHERE id = :id');
$res = $delete_stmt->execute([
':id' => $id,
]);
$db->exec('UNLOCK TABLES;');
}
protected function setOutputInfo($filename, $file_id, $has_error, $error_message, $entries, $orig_filename)