This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ZIP_FILEPATH = '/path'; | |
const ZIP_FILENAME = 'archive.zip'; | |
const ZIP_SUBDIRNAME = 'subdir'; // Folder inside archive | |
const ZIP_MAINDIRNAME = "maindir"; // Target folder containing files | |
/* If small archive folder use PHP. Note, on some big archives it doesn't extract all subfolders and files */ | |
function mergeFromZipPHP() | |
{ | |
$zip = new ZipArchive; // need to be isntalled on server | |
$zipPath = self::ZIP_FILEPATH.'/'.self::ZIP_FILENAME; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Potential issue on big projects. Composer can't require or update due to Vagrant's memory limits | |
$ /bin/dd if=/dev/zero of=/var/swap.1 bs=4096k count=1024 | |
$ chmod 600 /var/swap.1 | |
$ /sbin/mkswap /var/swap.1 | |
$ /sbin/swapon /var/swap.1 | |
$ COMPOSER_MEMORY_LIMIT=-1 composer require librairie/yours |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Queuing process vs one call : | |
## One call : | |
How to finish a server. Could result by an execution time exception, not optimised for large amount of tasks and very bad for user experience | |
## Queuing : | |
The tasks will be added to a queue and treated one by one with a cron job : this save user experience and performance | |
# For each task generate 1 .json/.txt file in a directory |