# |
Jul 20th 2017, 19:54 |
savant |
so you can send them a SIGQUIT or SIGTERM |
# |
Jul 20th 2017, 19:53 |
savant |
@cleptric i think you use that |
# |
Jul 20th 2017, 19:53 |
savant |
https://github.com/josegonzalez/php-queuesadilla/pull/65 |
# |
Jul 20th 2017, 19:53 |
savant |
@mikesmoniker queuesadilla supports signal handling |
# |
Jul 20th 2017, 19:52 |
savant |
mikesmoniker sure whatsup |
# |
Jul 20th 2017, 19:49 |
alysson-azevedo |
that `\` was missed somewhere |
# |
Jul 20th 2017, 19:48 |
alysson-azevedo |
i need it to returns my data as `{"data": "Sa\u00fade"}`, but $request->input() returns `{"data": "Sau00fade"}` |
# |
Jul 20th 2017, 19:45 |
alysson-azevedo |
Now i need help witht the $request->input() |
# |
Jul 20th 2017, 19:43 |
styks1987 |
ok, thanks. Just wanted to check. It seems I have something wrapping the json response in html... |
# |
Jul 20th 2017, 19:38 |
jeremyharris |
styks1987 usually the requesthandler is what does the automatic stuff, assuming you have extensions set in your routes |
# |
Jul 20th 2017, 19:35 |
styks1987 |
what triggers an exception to render as json vs html? |
# |
Jul 20th 2017, 19:34 |
gutts |
tried groupBy('type')->extract('type') but that defines 'a' and 'b' as the keys |
# |
Jul 20th 2017, 19:34 |
gutts |
ex [['type' => 'a'], ['type' => 'a'], ['type' => 'b']] i just want 'a' and 'b' |
# |
Jul 20th 2017, 19:34 |
gutts |
is there a way to extract by unique field in a cake collection? |
# |
Jul 20th 2017, 19:26 |
alysson-azevedo |
and i'm using an middleware to do it before my app is called |
# |
Jul 20th 2017, 19:25 |
alysson-azevedo |
the thing is that i need to validate an API signature. |
# |
Jul 20th 2017, 19:24 |
alysson-azevedo |
i mean |
# |
Jul 20th 2017, 19:24 |
jeremyharris |
oh ok |
# |
Jul 20th 2017, 19:24 |
jeremyharris |
or if it’s a string you want to set, I’ve got to look it up |
# |
Jul 20th 2017, 19:24 |
alysson-azevedo |
that works, thanks |
# |
Jul 20th 2017, 19:23 |
jeremyharris |
is this post body data that you want to change then? you can use withParsedBody |
# |
Jul 20th 2017, 19:22 |
alysson-azevedo |
yes. |
# |
Jul 20th 2017, 19:21 |
jeremyharris |
sorry misunderstood your code. looks like it’s middleware that you want to modify the body? |
# |
Jul 20th 2017, 19:21 |
jeremyharris |
it’s a response method |
# |
Jul 20th 2017, 19:21 |
alysson-azevedo |
i'll try find what method returns that object |
# |
Jul 20th 2017, 19:20 |
alysson-azevedo |
withStringBody does not exist |
# |
Jul 20th 2017, 19:19 |
jeremyharris |
try ->withStringBody if it’s a string |
# |
Jul 20th 2017, 19:19 |
alysson-azevedo |
how can i make that streaminterface? |
# |
Jul 20th 2017, 19:18 |
alysson-azevedo |
how can i create a new request element with same headers but diferent body? ``` $data = somefunc( $request->input() ); $request = $request->withBody($data); return $next($request, $response); ``` returns the error `Argument 1 passed to Cake\\Http\\ServerRequest::withBody() must implement interface Psr\\Http\\Message\\StreamInterface, string given` |
# |
Jul 20th 2017, 19:09 |
jeremyharris |
I’ve had no problems last few years |
# |
Jul 20th 2017, 19:09 |
mikesmoniker |
Good to know. |
# |
Jul 20th 2017, 19:08 |
jeremyharris |
yea they had a rough start, but they’ve been solid for a few years straight now after fixing their mesh issues |
# |
Jul 20th 2017, 19:08 |
mikesmoniker |
Er. They’ve gotten better recently? A few years ago they were kind of rough. |
# |
Jul 20th 2017, 19:08 |
mikesmoniker |
They' |
# |
Jul 20th 2017, 19:07 |
jeremyharris |
Pagoda Box |
# |
Jul 20th 2017, 19:07 |
mikesmoniker |
Which PaaS, if you don’t mind? |
# |
Jul 20th 2017, 19:07 |
jeremyharris |
that’s a good question, and one I can’t really answer well because I don’t manage my infrastructure - I use a PaaS. You bring up a good point about gracefully shutting them down, and it’s something I’m going to have to ask my provider about so I have a better understanding of how it works for me personally |
# |
Jul 20th 2017, 19:02 |
mikesmoniker |
Worth noting I have supervisord to spin up new workers. I’m just focusing on attractive ways of bringing down stale ones. |
# |
Jul 20th 2017, 19:01 |
mikesmoniker |
The latter is a bit of extra work for me because this app doesn’t have a redis/memcached/etc. backed cache right now. |
# |
Jul 20th 2017, 19:00 |
mikesmoniker |
I’m curious what strategies its users have employed for cycling out the workers (the shell) during/after app deployments. Right now I’m not setting a max # of jobs/worker, but doing so would be one way. Also considered some kind of global cache kill switch in the worker loop (I think Laravel does this). I obviously don’t want to just `kill` them, but of course need a way to update those processes when I deploy new code. |
# |
Jul 20th 2017, 18:58 |
jeremyharris |
I use it in my app, I might be able to help if he’s not around |