We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
👋 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.
<?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); } }
The annotations_games.json file was recently resized for the command to work properly. See chesslablab/chess-server@4e66dd9
annotations_games.json
<?php // src/Command/Data/AnnotationsGameCommand.php namespace ChessServer\Command\Data; use ChessServer\Command\AbstractCommand; use ChessServer\Socket\AbstractSocket; class AnnotationsGameCommand extends AbstractCommand { public function __construct() { $this->name = '/annotations_game'; $this->description = 'Annotated chess games.'; } public function validate(array $argv) { return count($argv) - 1 === 0; } public function run(AbstractSocket $socket, array $argv, int $id) { $this->pool->add(new AnnotationsGameAsyncTask(), 128000) ->then(function ($result) use ($socket, $id) { return $socket->getClientStorage()->send([$id], [ $this->name => $result, ]); }); } }
Now 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!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
👋 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 chesslablab/chess-server@4e66dd9Now 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!
The text was updated successfully, but these errors were encountered: