Samy
04/02/2023, 8:49 PMstark
04/02/2023, 8:49 PMWalshy | Pages
04/02/2023, 8:54 PMLarry
04/02/2023, 9:36 PMLarry
04/02/2023, 9:46 PMckoeninger
04/03/2023, 4:11 PMckoeninger
04/03/2023, 4:17 PMHardAtWork
04/03/2023, 4:18 PMckoeninger
04/03/2023, 4:18 PMHardAtWork
04/03/2023, 4:19 PMckoeninger
04/03/2023, 4:19 PMHardAtWork
04/03/2023, 4:20 PMhanpolo
04/03/2023, 6:38 PMAlexander.Xtreme
04/03/2023, 7:15 PMHardAtWork
04/03/2023, 7:18 PMHardAtWork
04/03/2023, 7:18 PMblockConcurrencyWhile
HardAtWork
04/03/2023, 7:19 PMUnsmart | Tech debt
04/03/2023, 7:20 PMHardAtWork
04/03/2023, 7:21 PMblockConcurrencyWhile
would at least prevent new events being delivered, (mostly) guaranteeing that each event gets 128 MB of memory.Unsmart | Tech debt
04/03/2023, 7:21 PMHardAtWork
04/03/2023, 7:22 PMAlexander.Xtreme
04/03/2023, 7:27 PMHardAtWork
04/03/2023, 7:32 PMAlexander.Xtreme
04/03/2023, 7:57 PMcrabmusket
04/03/2023, 11:52 PMblockConcurrencyWhile
to fetch some data, then create an object with the non-null result and store that object. Then your fetch
handler can delegate calls to that object, doing the null check in a single place.
This is a bit of ceremony, and might not be worth it. Sometimes I just end up with !
everywhere, or a guard clause at the top of every method which asserts that the state is valid.
But if your problem looks like a state machine, and there are a lot of different state properties which are null/valid together, then it can pay to model the states of the machine separately, rather than having "one big class" with everything in it.
I've only done this properly once, but I ended up writing the entire "business logic" of a DO in a separate class which was completely pure. The DO class then just instantiates and pokes the business logic class. It was great for testing - no need to set up websockets etc., I just wrote pure tests against the business object.Karmic
04/04/2023, 2:36 AMwrangler dev
but it fails to establish a connection. Doing it on a deployed workers url works fine. Does Wrangler not support websockets?aranchelk
04/04/2023, 5:20 AMAlexander.Xtreme
04/04/2023, 7:49 AMSmallShen
04/04/2023, 9:14 AMSkye
04/04/2023, 9:16 AM