feed
post by fridge
@fridge
9h ago •
okay fixed two issues going on:
[list]web server ran out of storage space
toast was spamming DMs with notifications[/list]here's a summary of what happened:
[h4]storage space[/h4]
every day at 3am, an automatic task is run to upload all website data [i](posts, images, music, etc.)[/i] to Google Drive for the sake of backing it up. to do this, it grabs all the data and compresses it into a single zip file, then uploads that file.
whenever we were making zip files, we weren't auto-deleting them from the server after uploading them, which meant that we had a ton of copies of the website's data existing on the server for no reason. this has been fixed, and we ended up clearing 40% of the storage space.
[h4]toast spamming DMs[/h4]
whenever an update is made to the server, GitHub logs into the server via a user called "deploy" and does all of its tasks logged in as that user. we do this because "deploy" is set up with non-harmful permissions, ensuring that the server and the data directory remain unharmed in a worst-case scenario.
recently, i updated the task that GitHub runs to include restarting Toast. this is an issue because it means that the code running Toast can only have as many permissions as the "deploy" user has, and "deploy" cannot touch the site's data. not good, because toast relies on a data file to keep track of what messages it has dished out notifications for, and if it can't edit the file, it has no idea if it's already sent out a notification and therefore will just continuously send them over and over.
quite an easy fix, just told the script to run toast as a user with the correct permissions.