diff options
| author | Teddy Wing | 2018-02-07 12:56:08 +0100 |
|---|---|---|
| committer | Teddy Wing | 2018-02-08 11:29:31 +0100 |
| commit | 871a088ccffc47e5e09272b3105dabecf10974a6 (patch) | |
| tree | cc5749c0300555051eae27b5328724ae25641d6f /app | |
| parent | 6134ed98a3fe29276a17a0d79a70a8ce3e3f548b (diff) | |
| download | chouette-core-871a088ccffc47e5e09272b3105dabecf10974a6.tar.bz2 | |
imports.rake(notify_parent): Use `ParentNotifier`
Replace `ParentImportNotifier` with the new generalised
`ParentNotifier`. This will allow us to use the same service for parent
notification of both imports and compliance check sets.
Delete the `ParentImportNotifier` class and spec as these are now
superseded by `ParentNotifier`.
Refs #4758
Diffstat (limited to 'app')
| -rw-r--r-- | app/services/parent_import_notifier.rb | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/app/services/parent_import_notifier.rb b/app/services/parent_import_notifier.rb deleted file mode 100644 index 47e6755e4..000000000 --- a/app/services/parent_import_notifier.rb +++ /dev/null @@ -1,15 +0,0 @@ -class ParentImportNotifier - def self.notify_when_finished(imports = nil) - imports ||= imports_pending_notification - imports.each(&:notify_parent) - end - - def self.imports_pending_notification - Import - .where( - notified_parent_at: nil, - status: Import.finished_statuses - ) - .where.not(parent: nil) - end -end |
