The trick is to only register the listener for events that indicate failure, namely
- PROCESS_STATE_STOPPED
- PROCESS_STATE_EXITED
- PROCESS_STATE_FATAL
Once they do, we should send a SIGQUIT to Supervisor.
| # Libraries and infrastructure | |
| sudo apt update -y | |
| sudo apt install -y \ | |
| docker.io docker-buildx \ | |
| build-essential pkg-config autoconf bison rustc cargo clang \ | |
| libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \ | |
| libvips imagemagick libmagickwand-dev mupdf mupdf-tools \ | |
| redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \ | |
| rbenv apache2-utils |
| function itemsSort(items) { | |
| // Write your code here | |
| const countObj = items.reduce((rlt, val) => { | |
| if (val in rlt) { | |
| rlt[val]++ | |
| } else { | |
| rlt[val] = 1 | |
| } | |
| return rlt; | |
| }, {}) |
| # Must run from the root of a Laravel app | |
| alias clearlog="truncate -s 0 $PWD/storage/logs/laravel.log" | |
| alias clearlogs="truncate -s 0 $PWD/storage/logs/*.log" | |
| # Or using git rev-parse | |
| alias clearlog="truncate -s 0 $(git rev-parse --show-toplevel)/storage/logs/laravel.log" | |
| alias clearlogs="truncate -s 0 $(git rev-parse --show-toplevel)/storage/logs/*.log" |
| <?php | |
| use PhpCsFixer\Config; | |
| use PhpCsFixer\Finder; | |
| $rules = [ | |
| 'phpdoc_indent' => true, | |
| 'binary_operator_spaces' => [ | |
| 'operators' => ['=>' => null] | |
| ], |
| module.exports = { | |
| semi: false, | |
| singleQuote: true, | |
| trailingComma: "es5", | |
| tabWidth: 2, | |
| } |
| $this->partialMock($ABSTRACT$, function ($mock) { | |
| /* @var \Mockery\MockInterface|\Mockery\LegacyMockInterface $mock */ | |
| $END$ | |
| }); |
| FROM composer:1.7 as vendor | |
| COPY database/ database/ | |
| COPY composer.json composer.json | |
| COPY composer.lock composer.lock | |
| RUN composer install \ | |
| --ignore-platform-reqs \ | |
| --no-interaction \ |
| ; if you're using the starter bundle file `docker/php/php-fpm.d/docker.conf` | |
| [global] | |
| daemonize = no | |
| pid = run/php-fpm.pid | |
| [www] | |
| listen = /usr/local/var/run/php-fpm.sock | |
| listen.owner = www-data | |
| listen.group = www-data | |
| listen.mode = 0660 |
I hereby claim:
To claim this, I am signing this object: