about summary refs log tree commit diff
path: root/users/Profpatsch/whatcd-resolver/src/AppT.hs
AgeCommit message (Collapse)AuthorFilesLines
2024-08-06 r/8449 fix(users/Profpatsch/whatcd-resolver): reduce json data from dbProfpatsch1-0/+10
We’d transfer the full json data for each torrent from the db instead of just the 2 or 3 fields we need. Adds some more helpers for parsing database values. Adds some better logging events & traces. Change-Id: I5db386c4ea247febf5f9fc3815da2e7f11286d41 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12140 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-08-06 r/8448 fix(users/Profpatsch/whatcd-resolver): fix postgres query logProfpatsch1-10/+21
The queries would not be interpolated anymore, because we didn’t pass the thing down deep enough. Also only init the `pgFormatPool` if we want to use the formatter, this saves on a bunch of subprocesses. Change-Id: I8d69ef5aab4d8eac1cbfb1c3991d4edaacba254f Reviewed-on: https://cl.tvl.fyi/c/depot/+/12139 Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2024-08-06 r/8447 fix(users/Profpatsch/whatcd-resolver): SQL formatting offProfpatsch1-7/+10
It turns out the pg_format thing is just too slow for my use-cases most of the time, even when pooling the mf. Most queries stay 90%+ in the perl script, even though they are very fast to execute on their own, screwing up the traces a lot. So instead I replace the `postgres-simple` quasi-quoter that strips whitespace (and tends to screw up queries anyway) with a simple one that just removes the outer indentation up to the first line. Why did I spend so much time on pg_format haha Change-Id: I911cd869deec68aa5cf430ff4d111b0662ec6d28 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12138 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-07-30 r/8427 feat(users/Profpatsch/whatcd-resolver): read redacted key from envProfpatsch1-2/+14
Change-Id: I5667710423aeeacfbb8dddf5b0b8750dc8f878aa Reviewed-on: https://cl.tvl.fyi/c/depot/+/12055 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-07-30 r/8426 fix(users/Profpatsch/whatcd-resolver): better show ApplicationErrorProfpatsch1-2/+4
Change-Id: I7a1087afc4000299529a7518f273bfee8d651c72 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12054 Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2024-06-03 r/8198 fix(users/Profpatsch/whatcd-resolver): fix transmission sessionProfpatsch1-1/+1
The logic around transmission session handling was f*cked, this fixes that. We use an IORef instead of an MVar, since we want to unconditionally write the new value. Even if multiple requests race, I *hope* that transmission returns the same session id, otherwise we might get a request loop. But it should be fine. (The semantics is not nicely documented in the RPC docs.) Additionally, log the session ids in the requests. Change-Id: Id7d33f8cb74cb349e502331cad5eb5abe8a624cd Reviewed-on: https://cl.tvl.fyi/c/depot/+/11673 Autosubmit: Profpatsch <mail@profpatsch.de> Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2024-05-13 r/8135 feat(users/Profpatsch/whatcd-resolver): use PgFormatPoolProfpatsch1-2/+1
It does chip of the init overhead of like 50–100ms, even though the formatting still takes quite some time (up to 200ms for more complex expressions). Maybe we need some simplistic formatter in the future that just splits on parens? It’s not an easy problem … Change-Id: I2ce951e6b3c2dc56294b1bdab913480727b50f0b Reviewed-on: https://cl.tvl.fyi/c/depot/+/11654 Autosubmit: Profpatsch <mail@profpatsch.de> Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2024-03-17 r/7715 feat(users/Profpatsch/whatcd-resolver): add autorefreshProfpatsch1-0/+16
Adds a little polling mechanism that compares against an ID that is generated anew every time the server is restarted. Works well together with shortcuttable. Change-Id: Icc6745b599e43881c14349794feaf5794cfe6777 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11172 Autosubmit: Profpatsch <mail@profpatsch.de> Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2024-03-16 r/7712 feat(users/Profpatsch/my-prelude): update librariesProfpatsch1-2/+2
The latest and greatest! Change-Id: I34c0e9f41b3b3cc727d9ea89c7ce6a43271b3170 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11169 Autosubmit: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-03-16 r/7709 feat(users/Profpatsch/whatcd-resolver): log json+ld fetchingProfpatsch1-2/+17
This traces the target of a json+ld fetch. We also simplify the telemetry stuff by using a pseudo-class `MonadOtel` everywhere. I wonder if we can get rid of passing the span to `assertM`, because it’s kind of an antipattern to be honest. Change-Id: I1448d643c909a29684fa1ae54037177ba2c20639 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11166 Tested-by: BuildkiteCI Autosubmit: Profpatsch <mail@profpatsch.de> Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-03-16 r/7708 refactor(users/Profpatsch/whatcd-resolver): move AppT & Html outProfpatsch1-0/+120
These functions are just general setup and html helpers, the main file is getting a bit long otherwise. Change-Id: I194e9f7f4caa4ce204d510c885dcf5af63d0e76e Reviewed-on: https://cl.tvl.fyi/c/depot/+/11165 Autosubmit: Profpatsch <mail@profpatsch.de> Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI