Closed ronovan closed 7 years ago
yo, why does s3_client need to be a property of the classes? can't it just be a global outside of the class?
that was part of my refactor but I don't think I ever realized how wrong it is now...anyway, gonna move s3 client to graffiti.py
and it'll just be passed in at runtime. Thank you!
Might also be why you had so many connections to the db (unless I'm getting confused)
nah, these connections are only to s3
much cleaner 👌
I was thinking of Post models stored in the db as objects, so the s3 client was initialized in the constructor...but when retrieving from the db I guess it doesn't go through the constructor again, so the s3 client must be re-initialized for retrieving the image from s3