-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image refactoring in the database #161
Labels
Comments
This was referenced Oct 9, 2018
Merged
Maybe we should let this one open until the feature is really live?
|
migration script is here https://gitlab.com/internet4000/radio4000-admin-backend-express/merge_requests/1 |
Before closing this, need to:
|
How do we know which images to delete?
|
Let's close this and discuss cloudinary image cleaning more in details in the appropriate channel |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We are loading way too many images from the database.
Background. We have two models:
channel
andimage
. A channel has many images although we never use anything but the latest image from a channel. The latest is aliased withchannel.coverImage
in the Ember model.When you upload a new image to a channel, the old images are NOT deleted. We simply always refer to the newest one. This, combined with the fact that the relationship is marked as
async
, we end up loading and processing tons of images.Idea for a solution:
hasMany
tobelongsTo
The text was updated successfully, but these errors were encountered: