Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions docs/en/workers/worker.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,28 @@ php-censor 19057 0.0 0.9 200244 18720 ? S 03:00 0:01 php /php-c
php-censor 19058 0.0 0.9 200244 18860 ? S 03:00 0:01 php /php-censor/console php-censor:worker
```

Also you can use systemd to run the worker.
Configuration for the unit is almost the same as supervisord's configuration.
Just copy this config to `/etc/systemd/system/php-censor.service` with right permissions, enable `systemctl enable php-censor.service` and run it by `systemctl start php-censor.service`. If you want to start more than one worker, just create more unit files with different name and repeat previous steps.

```
[Unit]
Description=PHPCensor Worker
After=network.target

[Service]
Type=simple
ExecStart=/your/path/bin/console php-censor:worker
Restart=always


User=php-censor #Could be changed
Group=php-censor #Could be changed

[Install]
WantedBy=multi-user.target
```

And check that it works properly by `systemctl status php-censor.service`

That's it! Now, whenever you create a new build in PHP Censor, it should start building immediately.