spatie / async

Easily run code asynchronously
https://spatie.be/en/opensource/php
MIT License
2.65k stars 179 forks source link

Serialize very large tasks to a temporary file #213

Closed gazugafan closed 1 year ago

gazugafan commented 1 year ago

When a serialized task is too large, it will fail to get sent over the command line. This PR will catch when a task is too large for this, save it to a temporary file, and just send the filename instead--seamlessly interpreting the file and deleting it. Should fix #76 and #151

I'm not sure what the maximum size limit is, and it probably differs by system. I've set it to 100000 bytes by default, but it can be configured using Pool->maxInputSize()

AlexVanderbist commented 1 year ago

Awesome, thanks!