Does it make sense to use maintenance_task for reports generated in a client-facing dashboard? #794
-
This gem is great -- I'm wondering whether it makes sense to use MaintenanceTasks as the backing task for generating reports initiated from a client-facing dashboard? For instance, if they request a slow report, we could use MaintenanceTask internals to show the progress of that report to the client? Would this be a bad idea for some reason, or is there a better reporting gem for something like that? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
maintenance_tasks
is meant to be used to replace Active Record migrations which only change data, so that doesn't fit too well. You'd be better off using your own model to store progress and job-iteration like the gem does, to generate the reporting. That way you could add more logic to your model like authorization, validations, etc. which the gem isn't well suited for.