You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We've been gradually stretching the TrainingModule, TrainingLibrary, and TrainingSlide classes beyond their original design, and the storage strategy is breaking down for the on-wiki training modules on P&E Dashboard.
We currently import training module content from the wiki, and we cache the entire collection of TrainingLibrary.all, TrainingModule.all, and TrainingSlide.all in respective Rails cache keys. This means that updating the content is more complex and interdependent than it ought to be, and we're running up against the (default) limits of our cache infrastructure as well. (By default memcached has a 1M limit on file size, and P&E Dashboard now requires more than that. For now, I've increased the max memcached file size on the server.)
We should instead be storing all the training content in ActiveRecord, I think. We could then easily update individual slides and modules without worrying as much about the interdependence. A slide belongs to a module, and a module belongs to a library. Easy peasy.
This will involve:
Turning the training classes into ActiveRecord models (and maybe turn TrainingBase into a module).
Updating TrainingLoader to work with those models and their relations.
The text was updated successfully, but these errors were encountered:
This has been done for TrainingSlide. TrainingModule and TrainingLibrary ought to be converted to ActiveRecord at some point, but for now they aren't causing any real problems.
We've been gradually stretching the TrainingModule, TrainingLibrary, and TrainingSlide classes beyond their original design, and the storage strategy is breaking down for the on-wiki training modules on P&E Dashboard.
We currently import training module content from the wiki, and we cache the entire collection of TrainingLibrary.all, TrainingModule.all, and TrainingSlide.all in respective Rails cache keys. This means that updating the content is more complex and interdependent than it ought to be, and we're running up against the (default) limits of our cache infrastructure as well. (By default memcached has a 1M limit on file size, and P&E Dashboard now requires more than that. For now, I've increased the max memcached file size on the server.)
We should instead be storing all the training content in ActiveRecord, I think. We could then easily update individual slides and modules without worrying as much about the interdependence. A slide belongs to a module, and a module belongs to a library. Easy peasy.
This will involve:
module
).The text was updated successfully, but these errors were encountered: