Skip to content

Commit

Permalink
added DBO release to image processing tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketMan committed Dec 6, 2023
1 parent 24765e9 commit 1d206b6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions controllers/PushServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,8 @@ protected function injectImageData($msg) {
$entry['info_url'] = $infoUrl ?? null;
$entry['image_url'] = isset($imageUuid) ? $imageApi->getCachePath($imageUuid) : ($entry['info_url'] || $entry['track_tag'] ? "img/discogs.svg" : "img/blank.gif");
$msg = json_encode($entry);

DBO::release();
}
}

Expand Down Expand Up @@ -447,6 +449,8 @@ protected function processImageQueue() {
$imageUuid = $imageApi->insertArtistArt($artist, $result->imageUrl, $result->infoUrl);
}

DBO::release();

if(!$this->imageQ->isEmpty()) {
$this->loop->addTimer(self::QUERY_DELAY, function() {
$this->processImageQueue();
Expand Down

0 comments on commit 1d206b6

Please sign in to comment.