codefornola / nola-transit-map

Realtime view of all NOLA public transit vehicles https://nolatransit.fly.dev/
MIT License
19 stars 6 forks source link

Go cleaning #10

Closed chr1sto14 closed 1 year ago

chr1sto14 commented 1 year ago

Saw some Go refactoring opportunities and I got carried away.

saving this PR as a draft until I have time to add some unit tests.

chr1sto14 commented 1 year ago

@bhelx, I've refactored the Go server for improved readability. I've only tested locally with mock data. I'll ping you on Slack later in the week for the key so I test against live data.

chr1sto14 commented 1 year ago

Tested with key and ip.

Added a missing poll on startup.

Should be ready for review, @bhelx

bhelx commented 1 year ago

Looking good on my machine. Going to try it out. Thanks again!

bhelx commented 1 year ago

It's deployed. Needed a small change to get the image to build: https://github.com/codefornola/nola-transit-map/commit/f80ae67dcfd8112e03455bdc30d8879977832d02

Since this is a pretty big change, please keep an eye on it this week. I'll be testing it out.

bhelx commented 1 year ago

Sorry @chr1sto14 I had to revert #10 because the deployed code is the rolled back code. We can't deploy anything until this bug is fixed. I appreciate the refactors, but could we break it up into some smaller PRs? I wasn't able to remove just the piece that introduced the bug.