<?php
// src/Command/Data/AnnotationsGameAsyncTask.php
namespace ChessServer\Command\Data;
use ChessServer\Socket\AbstractSocket;
use Spatie\Async\Task;
class AnnotationsGameAsyncTask extends Task
{
const ANNOTATIONS_GAMES_FILE = 'annotations_games.json';
public function configure()
{
}
public function run()
{
$contents = file_get_contents(AbstractSocket::DATA_FOLDER.'/'.self::ANNOTATIONS_GAMES_FILE);
return json_decode($contents);
}
}
š Hello there,
We're parallelizing long-running tasks with the help of spatie/async and everything is going smoothly.
However, src/Command/Data/AnnotationsGameAsyncTask.php seems to be failing silently when the output sent to the browser is a few kilobytes (KB) in size.
The
annotations_games.json
file was recently resized for the command to work properly. See https://github.com/chesslablab/chess-server/commit/4e66dd999c0d2380de4adaa62bb79097c60da072Now I'm wondering if the pool could be set up for this command to download files of several dozen kilobytes, let's say 64 KB.
š Thanks for the help, and keep up the great work!