View past import operations and allow recurring operations
refs #306
For the moment recurring operations can only be set by admins. I’m not 100% sure what the UI would be. The model supports arbitrary cron-like patterns but we don’t need this.
WIP for this MR:
-
make sure the map
<->operations
relation is useful -
Import::Operation#deep_dup
:-
unit tests -
duplicate the (cached) analysis too
-
-
Import::Configuration#recurrence
and#next_occurence
-
unit tests
-
-
remove theJe les laisse en attendant #347 (closed).strict_loading!
s
Later:
- Move the import reports to another, text-only log page
- Add a proper UI for recurring operations. Maybe a checkbox “run daily” with a time picker.
- Allow cancelling a recurring operation.
- Add a relation between the GoodJob entry and the (recurring) Operation. For diagnosis and reliability, we want to be able to find the Job that is currently running, or scheduled to run, an operation.
- Add an extra “Scheduled” status in Operation. Actually the “Started” status is misleading, and probably could be renamed to “Scheduled”. On the other hand, we currently don’t update the operation status until the end of job, since everything is done in a transaction. That would need to change.
- Merge the
Import::Operation
andImport::Configuration
? Initially the idea was that a configuration would be reused, but it’s actually easier (and less error-prone) todeep_dup
the operation, configuration and mappings. I estimate it would simplify the code quite a bit.
Edited by Nicolas Bouilleaud