-
Notifications
You must be signed in to change notification settings - Fork 45
Big Cleanup #28
base: master
Are you sure you want to change the base?
Big Cleanup #28
Conversation
… per-person, instead of spamming each slot
wow, that's a lot. i'll need some time to carve the time for review of all the things. |
ok, so after taking long look and thought - i think this PR goes a bit against my initial thought with this project (short and simple hosted service that i've shared with others) |
Heya 👋
This is more of a meta-PR than a single PR. It's quite large, so we can split it up if there are changes you're interested in.
I wanted to extend some of the parsing for my own personal needs, and I took it probably a couple of steps further I needed to...but some of the changes might be helpful to you too.
At a high level, here's what's different:
BOT_EMAIL
andBOT_ID
env vars, to send as HTTP headers, as semi-officially documented in nicbou/burgeramt-appointments-websocketsAt this point I was starting to think about the best way to move this project forward overall:
On one hand, having a centralised bot to handle all requests is a lot of a requests from a single IP but can easily scale to serve 1000s of people. Officially (based on notes from nicbou/burgeramt-appointments-websockets) that is too many requests, so an alternative might be necessary.
Therefore on the other hand, maybe making this tool easy to spin up as a single-use thing might make sense. i.e. having a "DigialOcean 1-click app", or "deploy to AWS" so someone could manage their own instance until they get an appointment, then shut it down.
Combining the two options could be a viable step forward: having each service as an independent worker, which all notify back to a central Telegram bot server, will mean the bot should be able to scale more easily. In this case, I imagine a "service" to mean a unique
dienstleisterlist
andanliegen
pair.Some TODOs I'd like to get to at some point:
/add https://service.berlin.de/dienstleistung/120702/
or/add [berlin-wide appointment search URL]
is (sometimes) easier than selecting it from the menu. Especially if you want an appointment from a specific location/add 121616 sonnenallee
will only add the Sonnenallee amt to thedienstleisterlist
parameterThat's probably enough for now :) If there's anything that sounds interesting to you, I can carve out separate PRs. Let me know!