aboutsummaryrefslogtreecommitdiffstats
path: root/app/workers
diff options
context:
space:
mode:
authorRobert2017-10-23 13:30:57 +0200
committerRobert2017-10-24 15:28:45 +0200
commitf88df773cb31c9967430af0c3cd7bd9df46e46e0 (patch)
tree41865abc47ae4fd254447a83cd998afcf33a128d /app/workers
parentddd885d2acec8a39a82dfb34e7810b52c8f01c94 (diff)
downloadchouette-core-f88df773cb31c9967430af0c3cd7bd9df46e46e0.tar.bz2
Fixes: #4633@0.5h; Implenting correct message for inconsistent zip file
Diffstat (limited to 'app/workers')
-rw-r--r--app/workers/workbench_import_worker.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/app/workers/workbench_import_worker.rb b/app/workers/workbench_import_worker.rb
index b28e96acc..80f458e1c 100644
--- a/app/workers/workbench_import_worker.rb
+++ b/app/workers/workbench_import_worker.rb
@@ -50,12 +50,17 @@ class WorkbenchImportWorker
def update_object_state entry, count
@workbench_import.update( current_step: count )
- # TODO: Determine the other attributes of the message, especially how to add the names
- # of the spurious dirs entry.spurious
unless entry.spurious.empty?
- @workbench_import.messages.create(criticity: :warning, message_key: 'xxx')
+ @workbench_import.messages.create(
+ criticity: :warning,
+ message_key: 'inconsistent_zip_file',
+ message_attributes: {
+ 'import_name' => @workbench_import.name,
+ 'spurious_dirs' => entry.spurious.inspect
+ })
end
end
+
def upload_entry_group entry, element_count
update_object_state entry, element_count.succ
# status = retry_service.execute(&upload_entry_group_proc(entry))