Skip to content

Commit

Permalink
Fix job timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
ellermister committed Sep 20, 2024
1 parent 6020c07 commit 32b68a9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ RUN composer install \

RUN cp .env.example .env \
&& php artisan key:generate \
&& rm -f public/storage && php artisan storage:link
&& rm -f public/storage && php artisan storage:link \
&& php artisan migrate

CMD ["/usr/local/bin/supervisord", "-c", "/etc/supervisord.conf"]
2 changes: 1 addition & 1 deletion app/Jobs/UpdateFavListJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public function pullFavList($id)
$response = file_get_contents($url, false, $context);
$result = json_decode($response, true);

if (isset($result['data'])) {
if (isset($result['data']) && is_array($result['data']['medias'])) {
foreach ($result['data']['medias'] as $value) {

$filename = $this->convertToFilename($value['cover']);
Expand Down
2 changes: 1 addition & 1 deletion config/horizon.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
'maxJobs' => 0,
'memory' => 128,
'tries' => 1,
'timeout' => 60,
'timeout' => 1600,
'nice' => 0,
],
],
Expand Down

0 comments on commit 32b68a9

Please sign in to comment.