diff options
author | Wolfy-J <[email protected]> | 2019-06-29 23:58:57 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2019-06-29 23:58:57 +0300 |
commit | 53ed5e5dc6836ac1d6222fed602204257583a549 (patch) | |
tree | 1f637b61cf629bec4dde74ba4ea9b0e1ad5fbd33 | |
parent | 297031a523070040cf2de63b409135c5098bc393 (diff) | |
parent | 216b6a3d3717f9212c94721d1a1b89d3730f419c (diff) |
Merge remote-tracking branch 'origin/master'
-rw-r--r-- | .rr.yaml | 10 | ||||
-rw-r--r-- | README.md | 22 | ||||
-rw-r--r-- | worker.go | 4 |
3 files changed, 33 insertions, 3 deletions
@@ -13,11 +13,21 @@ rpc: metrics: # prometheus client address (path /metrics added automatically) address: localhost:2112 + + # list of metrics to collect from application collect: + # metric name app_metric: + # type [gauge, counter, histogram, symnmary] type: histogram + + # short description help: "Custom application metric" + + # metric groups/tags labels: ["type"] + + # for histogram only buckets: [0.1, 0.2, 0.3, 1.0] # http service configuration. @@ -47,11 +47,21 @@ Features: - integrations with Symfony, Laravel, Slim, CakePHP, Zend Expressive, Spiral - works on Windows +Installation: +-------- +To install: + +``` +$ composer require spiral/roadrunner +$ ./vendor/bin/rr get-binary +``` + Example: -------- ```php <?php +// worker.php ini_set('display_errors', 'stderr'); include "vendor/autoload.php"; @@ -75,11 +85,19 @@ Configuration can be located in `.rr.yaml` file ([full sample](https://github.co ```yaml http: address: 0.0.0.0:8080 - workers.command: "php psr-worker.php" + workers.command: "php worker.php" ``` > Read more in [Wiki](https://github.com/spiral/roadrunner/wiki/PHP-Workers). +Run: +---- +To run application server: + +``` +$ ./rr serve -v -d +``` + License: -------- -The MIT License (MIT). Please see [`LICENSE`](./LICENSE) for more information. Maintained by [SpiralScout](https://spiralscout.com). +The MIT License (MIT). Please see [`LICENSE`](./LICENSE) for more information. Maintained by [Spiral Scout](https://spiralscout.com). @@ -230,7 +230,9 @@ func (w *Worker) execPayload(rqs *Payload) (rsp *Payload, err error) { return nil, errors.Wrap(err, "header error") } - w.rl.Send(rqs.Body, 0) + if err = w.rl.Send(rqs.Body, 0); err != nil { + return nil, errors.Wrap(err, "sender error") + } var pr goridge.Prefix rsp = new(Payload) |