Skip to content
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

Should characterize be kicked off by Sufia::GenericFile::Actions.create_content? #232

Closed
jcoyne opened this issue Oct 18, 2013 · 2 comments · Fixed by #444
Closed

Should characterize be kicked off by Sufia::GenericFile::Actions.create_content? #232

jcoyne opened this issue Oct 18, 2013 · 2 comments · Fixed by #444

Comments

@jcoyne
Copy link
Contributor

jcoyne commented Oct 18, 2013

Then we can remove the around_save :characterize_if_changed from GenericFile.

This makes the code easier to follow.

@mjgiarlo
Copy link
Member

Not having my head in the code lately, I ask what may be an obvious question: can we rely upon Actions.create_content getting called, or are there other paths around it? Put otherwise, the advantage of a hook is that it "just works" on save.

@jcoyne
Copy link
Contributor Author

jcoyne commented Oct 18, 2013

@mjgiarlo Aye, the huge advantage is that we know it works. Another drawbacks is that it is slowing down our system considerably, because it's always checks for content change on every save. We can shoulder some of that responsibility as coders by agreeing that we always deposit files via the Sufia::GenericFile::Actions.create_content service method.

jcoyne added a commit that referenced this issue May 15, 2014
Instead run the characterization from the FilesControllerBehavior. This
makes testing far easier. Fixes #232
jcoyne added a commit that referenced this issue May 15, 2014
Instead run the characterization from the FilesControllerBehavior. This
makes testing far easier. Fixes #232
jcoyne added a commit that referenced this issue May 15, 2014
Instead run the characterization from the FilesControllerBehavior. This
makes testing far easier. Fixes #232
jcoyne added a commit that referenced this issue May 15, 2014
jcoyne added a commit that referenced this issue May 15, 2014
jcoyne added a commit that referenced this issue May 15, 2014
jcoyne added a commit that referenced this issue May 15, 2014
jcoyne added a commit that referenced this issue Nov 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants