Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Log when a storage is marked as unavailable
Signed-off-by: Morris Jobke <[email protected]>
  • Loading branch information
MorrisJobke authored and backportbot[bot] committed Mar 25, 2021
commit cf8be87e47ce2e63c87f5a7bd6dc93b1cd6b6838
4 changes: 4 additions & 0 deletions lib/private/Files/Cache/Storage.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
namespace OC\Files\Cache;

use OCP\Files\Storage\IStorage;
use Psr\Log\LoggerInterface;

/**
* Handle the mapping between the string and numeric storage ids
Expand Down Expand Up @@ -175,6 +176,9 @@ public function getAvailability() {
*/
public function setAvailability($isAvailable, int $delay = 0) {
$available = $isAvailable ? 1 : 0;
if (!$isAvailable) {
\OC::$server->get(LoggerInterface::class)->info('Storage with ' . $this->storageId . ' marked as unavailable', ['app' => 'lib']);
}

$query = \OC::$server->getDatabaseConnection()->getQueryBuilder();
$query->update('storages')
Expand Down