26 Nov 2021
jnthnwrthngtn If all you need is to run it with the timeline view just 1) new project from sources, 2) create a run configuration and tell it what script to run and what parameters to pass to Raku (for example any -Ifoo) 12:25
Then Run with timeline view. That should be it. 12:26
(In order to get the visualization, anyway)
_Xliff_ Can you set up environment vars using Comma? 12:27
jnthnwrthngtn Really all it does is run Rakudo with an env var set telling Log::Timeline a port number, then connects to it.
Yes, in the run configuration dialog
That's been possible pretty much forever for running scripts (and probably for well over a year for tests too :)) 12:28
_Xliff_ Add as Cro service sor Raku app? 12:31
jnthnwrthngtn If you have a .cro.yml then as Cro service, but all it will really do is set up the env vars from that file for you 12:35
If you're not using `cro run` to run the thing then just go for Raku app
_Xliff_ It's picking up external libraries from the wrong place. 12:45
I haved a -I for my own version of Cro::WebApp, but it is using the system installed version. Even with -I in the run config.
OK, so how do I get the JSON data? I will just have to run it without comma for the time being. 12:49
jnthnwrthngtn Huh, does the command line that it actually runs look correct? 12:50
You put the -I things in Raku parameters, not script parameters? 12:51
_Xliff_ Yep. 12:52
jnthnwrthngtn Hm, so does the command it runs match what you run manually? I mean, Comma doesn't have any say in how to find modules, it's just invoking Rakudo. 12:54
Anyway, see Log::Timeline README for the environment variable to set if you want to do it that way
_Xliff_ I'd have to restart everything again, but the command looked right.
jnthnwrthngtn I'm guessing either something missed or maybe incorrect working directory, if you have relative -I paths 12:58
_Xliff_ OK. So request has been made and I only have 1 entry in log file. 13:00
Is that a good thing or does that indicate I'm still processing a request?
Yeah. K = 1 and no corresponding k=2. 13:01
So what can hang up things like this?
OK, so "Process Request" which is i:1 has a k:1 but no accompanying k:2 13:07
Same with i:2
Actually no. i:2 finishes. i:3 and i:4 do not. 13:09
jnthnwrthngtn Hm, I'm guessing IO buffering... 13:13
(there should be more in the ifle than that)
I'd expect there not only to be process request but a breakdown of the phases of request processing too 13:14
_Xliff_ Hmm.... php script hangs on POST request and doesn't do anything else until I kill the server.
jnthnwrthngtn (Feel free to paste the output somehwere so I can maybe see something in it) 13:15
_Xliff_ gist.github.com/Xliff/1b77ae9a146d...d4fd6b6719 13:19
Something is definitely hanging the server. 13:21
jnthnwrthngtn But does the POST request ever make it into the request handler? 13:23
_Xliff_ No. Not until I abort the server.
jnthnwrthngtn huh, that makes it look like the request doesn't even get parsed 13:26
_Xliff_ Yeah. I'm using DB::MySQL -- Looks like I need to call .finish on the statement handle, but seems there is some laziness involved. 13:28
jnthnwrthngtn How are you producing a response? `content ` and then what? 13:29
jnthnwrthngtn is quite confused by this point, though, as the pieces don't add up :) 13:30
_Xliff_ Welcome to my world. 13:31
OK. I need to sleep. Thanks for the help!
jnthnwrthngtn Rest well 13:32
lizmat so, I just realized that I have a case for letting browsers / proxies cache on request generated HTML 18:24
so it looks like "content" could also some some args describing caching baheviour 18:25
*behaviour
jnthnwrthngtn lizmat: No, you just call `cache-control` (before or after content) 18:33
Or if it should apply over many route handlers, but it in an `after-matched` block 18:34
lizmat jnthnwrthngtn++
jnthnwrthngtn See cro.services/docs/reference/cro-ht...achability 18:35
lizmat was just looking at that, how could I have missed that before :-)
jnthnwrthngtn
.oO( we have too many features :D )
18:36
Home time for me. :)