diff options
author | Valery Piashchynski <[email protected]> | 2021-10-01 15:03:37 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2021-10-01 15:03:37 +0300 |
commit | ccf08c9470453f498cc20bc2245004662690320e (patch) | |
tree | 7e770c084f13d7df31ed2ffbfa33f8fd8ab362e9 | |
parent | 0a0d9cc38dcfa1a799e2bc1ecbc3dd4bbabd526a (diff) | |
parent | 340ad8870657fb943d14963c7b72c15d163d4729 (diff) |
[#817]: feat(release): `beta` pre-releasev2.5.0-beta.1
[#817]: feat(release): `beta` pre-release
-rw-r--r-- | .vscode/settings.json | 40 | ||||
-rw-r--r-- | CHANGELOG.md | 84 | ||||
-rw-r--r-- | go.mod | 10 | ||||
-rw-r--r-- | go.sum | 30 | ||||
-rw-r--r-- | tests/jobs_err.php | 52 | ||||
-rw-r--r-- | tests/jobs_ok.php | 27 |
6 files changed, 84 insertions, 159 deletions
diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 8d55456f..00000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "cSpell.words": [ - "addrs", - "amqp", - "amqpjobs", - "anypb", - "boltdb", - "codecov", - "Errored", - "Conv", - "golangci", - "gomemcache", - "goridge", - "hget", - "hset", - "INMEMORY", - "keyvals", - "Itestdata", - "memcachedkv", - "memorykv", - "mexpire", - "mget", - "prefetch", - "proto", - "protobuf", - "protoc", - "SETEX", - "shivammathur", - "srem", - "stretchr", - "tmpdir", - "unsub", - "Upgrader", - "websockets", - "websocketsv" - ], - "files.associations": { - "Dockerfile-*.yaml": "dockerfile" - } -} diff --git a/CHANGELOG.md b/CHANGELOG.md index 552b3ea3..6b32778a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # CHANGELOG -## v2.5.0 (-.-.2021) +## v2.5.0 (-.10.2021) + ## 💔 BC: - 🔨 Some drivers now use a new `config` key to handle local configuration. Involved plugins and drivers: @@ -13,9 +14,9 @@ ```yaml broadcast: - default: - driver: memory - interval: 1 + default: + driver: memory + interval: 1 ``` ### New style: @@ -42,27 +43,82 @@ kv: - "127.0.0.1:11211" broadcast: - default: - driver: redis - config: <------------------ NEW - addrs: - - "127.0.0.1:6379" + default: + driver: redis + config: <------------------ NEW + addrs: + - "127.0.0.1:6379" ``` ## 👀 New: -- ✏️ [BETA] GRPC plugin update to v2. +- ✏️ **[BETA]** GRPC plugin update to v2. - ✏️ [Roadrunner-plugins](https://github.com/spiral/roadrunner-plugins) repository. This is the new home for the roadrunner plugins with documentation, configuration samples, and common problems. +- ✏️ **[BETA]** Let's Encrypt support. RR now can obtain an SSL certificate/PK for your domain automatically. Here is the new configuration: +```yaml +ssl: + address: '0.0.0.0:443' + acme: + certs_dir: rr_le_certs + email: you-email-here@email + # alternate port for the http challenge + "alt_http_port": 80, + # alternate port for the tls-alpn challenge + "alt_tlsalpn_port": 443, + challenge_type: http-01 + use_production_endpoint: true + domains: [ + "your-cool-domain.here", + "your-second-domain.here" + ] +``` + +- ✏️ Add new option to the `service` plugin. Service plugin will not use std rr logger as output in flavor of raw output. + +New options: +```yaml +# Service plugin settings +service: + some_service_1: + (....) + # Console output + # + # Default: stderr. Available options: stderr, stdout + output: "stderr" + + # Endings for the stderr/stdout output + # + # Default: "\n". Available options: any. + line_ending: "\n" + + # Color for regular output + # + # Default: none. Available options: white, red, green, yellow, blue, magenta + color: "green" + + # Color for the process errors + # + # Default: none. Available options: white, red, green, yellow, blue, magenta + err_color: "red" +``` + +**!!!** +Be careful, now, there is no logger plugin dependency for the `service` plugin. That means, that if you used `json` output, now, +you need to serialize data on the `executable` (in the command) side. + ## 🩹 Fixes: -- 🐛 Fix: local and global configuration parsing +- 🐛 Fix: local and global configuration parsing. +- 🐛 Fix: bug with the `boltdb-jobs` connection left open after RPC close command. +- 🐛 Fix: close `beanstalk` connection and release associated resources after pipeline stop. ## 📦 Packages: -- 📦 Roadrunner `v2.5.0` -- 📦 Roadrunner-plugins `v2.5.0` -- 📦 Roadrunner-temporal `v1.0.10` +- 📦 roadrunner `v2.5.0` +- 📦 roadrunner-plugins `v2.5.0` +- 📦 roadrunner-temporal `v1.0.10` +- 📦 goridge `v3.2.2` ## v2.4.1 (13.09.2021) @@ -6,8 +6,10 @@ require ( github.com/google/uuid v1.3.0 github.com/json-iterator/go v1.1.12 github.com/shirou/gopsutil v3.21.8+incompatible + // spiral github.com/spiral/errors v1.0.12 - github.com/spiral/goridge/v3 v3.2.1 + github.com/spiral/goridge/v3 v3.2.2-beta.1 + // spiral github.com/stretchr/testify v1.7.0 github.com/valyala/tcplisten v1.0.0 go.uber.org/multierr v1.7.0 @@ -28,10 +30,10 @@ require ( github.com/tklauser/go-sysconf v0.3.9 // indirect github.com/tklauser/numcpus v0.3.0 // indirect go.uber.org/atomic v1.9.0 // indirect - golang.org/x/net v0.0.0-20210916014120-12bc252f5db8 // indirect - golang.org/x/sys v0.0.0-20210915083310-ed5796bab164 // indirect + golang.org/x/net v0.0.0-20210929193557-e81a3d93ecf6 // indirect + golang.org/x/sys v0.0.0-20211001092434-39dca1131b70 // indirect golang.org/x/text v0.3.7 // indirect - google.golang.org/genproto v0.0.0-20210916144049-3192f974c780 // indirect + google.golang.org/genproto v0.0.0-20210930144712-2e2e1008e8a3 // indirect google.golang.org/protobuf v1.27.1 // indirect gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect @@ -55,7 +55,6 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= @@ -66,8 +65,6 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -79,8 +76,8 @@ github.com/shirou/gopsutil v3.21.8+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spiral/errors v1.0.12 h1:38Waf8ZL/Xvxg4HTYGmrUbvi7TCHivmuatNQZlBhQ8s= github.com/spiral/errors v1.0.12/go.mod h1:j5UReqxZxfkwXkI9mFY87VhEXcXmSg7kAk5Sswy1eEA= -github.com/spiral/goridge/v3 v3.2.1 h1:5IJofcvWYjAy+X5XevOhwf/8F0i0Bu/baPsBGiSgqzU= -github.com/spiral/goridge/v3 v3.2.1/go.mod h1:jDHXTORSxchJYCv2jG4vtZojsa+4JJyXmfdPefOpJ3c= +github.com/spiral/goridge/v3 v3.2.2-beta.1 h1:UoCrUTLXz3dshg94qkWamUz6DOEQaJOVt0aOu9QFxPc= +github.com/spiral/goridge/v3 v3.2.2-beta.1/go.mod h1:DA4Ekw9qVcTvVouUNJgxESXURBHZ2SfkliCEIpEl9lA= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= @@ -95,7 +92,6 @@ github.com/valyala/tcplisten v1.0.0 h1:rBHj/Xf+E1tRGZyWIWwJDiRY0zc1Js+CV5DqwacVS github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc= github.com/vmihailenco/msgpack/v5 v5.3.4/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= @@ -103,26 +99,21 @@ go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/multierr v1.7.0 h1:zaiO/rmgFjbmCXdSYJWQcdvOCsthmdaHfr3Gm2Kx4Ec= go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210916014120-12bc252f5db8 h1:/6y1LfuqNuQdHAm0jjtPtgRcxIxjVZgm5OTu8/QhZvk= -golang.org/x/net v0.0.0-20210916014120-12bc252f5db8/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210929193557-e81a3d93ecf6 h1:Z04ewVs7JhXaYkmDhBERPi41gnltfQpMWDnTnQbaCqk= +golang.org/x/net v0.0.0-20210929193557-e81a3d93ecf6/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -141,8 +132,8 @@ golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210915083310-ed5796bab164 h1:7ZDGnxgHAMw7thfC5bEos0RDAccZKxioiWBhfIe+tvw= -golang.org/x/sys v0.0.0-20210915083310-ed5796bab164/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211001092434-39dca1131b70 h1:pGleJoyD1yA5HfvuaksHxD0404gsEkNDerKsQ0N0y1s= +golang.org/x/sys v0.0.0-20211001092434-39dca1131b70/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -155,11 +146,6 @@ golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -169,8 +155,8 @@ google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoA google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20210916144049-3192f974c780 h1:RE6jTVCXBKZ7U9atSg8N3bsjRvvUujhEPspbEhdyy8s= -google.golang.org/genproto v0.0.0-20210916144049-3192f974c780/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210930144712-2e2e1008e8a3 h1:+F3FcO6LTrzNq5wp1Z6JtoBvnJzX6euyN70FoyMDXy4= +google.golang.org/genproto v0.0.0-20210930144712-2e2e1008e8a3/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= diff --git a/tests/jobs_err.php b/tests/jobs_err.php deleted file mode 100644 index 4ccea4f8..00000000 --- a/tests/jobs_err.php +++ /dev/null @@ -1,52 +0,0 @@ -<?php - -/** - * @var Goridge\RelayInterface $relay - */ - -use Spiral\Goridge; -use Spiral\RoadRunner; -use Spiral\Goridge\StreamRelay; - -require __DIR__ . "/vendor/autoload.php"; - -$rr = new RoadRunner\Worker(new StreamRelay(\STDIN, \STDOUT)); - -while ($in = $rr->waitPayload()) { - try { - $ctx = json_decode($in->header, true); - $headers = $ctx['headers']; - - $set = isset($headers['attempts']); - - $val = 0; - - if ($set == true) { - $val = intval($headers['attempts'][0]); - $val++; - $headers['attempts'][0] = strval($val); - } else { - $headers['attempts'][0] = "1"; - }; - - if ($val > 3) { - $rr->respond(new RoadRunner\Payload(json_encode([ - // no error - 'type' => 0, - 'data' => [] - ]))); - } else { - $rr->respond(new RoadRunner\Payload(json_encode([ - 'type' => 1, - 'data' => [ - 'message' => 'error', - 'requeue' => true, - 'delay_seconds' => 5, - 'headers' => $headers - ] - ]))); - } - } catch (\Throwable $e) { - $rr->error((string)$e); - } -} diff --git a/tests/jobs_ok.php b/tests/jobs_ok.php deleted file mode 100644 index 4e786d15..00000000 --- a/tests/jobs_ok.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php - -/** - * @var Goridge\RelayInterface $relay - */ - -use Spiral\Goridge; -use Spiral\RoadRunner; -use Spiral\Goridge\StreamRelay; - -require __DIR__ . "/vendor/autoload.php"; - -$rr = new RoadRunner\Worker(new StreamRelay(\STDIN, \STDOUT)); - -while ($in = $rr->waitPayload()) { - try { - $ctx = json_decode($in->header, true); - $headers = $ctx['headers']; - - $rr->respond(new RoadRunner\Payload(json_encode([ - 'type' => 0, - 'data' => [] - ]))); - } catch (\Throwable $e) { - $rr->error((string)$e); - } -} |