previously, the fields hdd_count and hdd_size where used. these had various problems:
didn't account for SSDs at all
didn't account for servers with varying disk sizes
were just straight up wrong sometimes :D
so now, we use the more accurate array serverDiskData to fetch all types of disks.
also changed the offer formatting to account for the new types.
todo for another PR: add /set commands for ssds
one small issue with the PR: the new model offer_disk has an id property, because sqlalchemy doesn't like tables without a primary key. now on each call to update_offers, we toss away all existing entries and write new ones. this causes the id values to keep getting bigger over time.
previously, the fields
hdd_count
andhdd_size
where used. these had various problems:so now, we use the more accurate array
serverDiskData
to fetch all types of disks.also changed the offer formatting to account for the new types.
todo for another PR: add
/set
commands for ssdsone small issue with the PR: the new model
offer_disk
has anid
property, because sqlalchemy doesn't like tables without a primary key. now on each call toupdate_offers
, we toss away all existing entries and write new ones. this causes theid
values to keep getting bigger over time.