diff --git a/src/ngamsServer/ngamsServer/ngamsArchiveUtils.py b/src/ngamsServer/ngamsServer/ngamsArchiveUtils.py index 4f45ff53..843c13e4 100644 --- a/src/ngamsServer/ngamsServer/ngamsArchiveUtils.py +++ b/src/ngamsServer/ngamsServer/ngamsArchiveUtils.py @@ -1253,7 +1253,7 @@ def finish_archive_request(srv, req, http_ref, plugin_result, disk_info): http_ref.send_ingest_status(msg, disk_info) # After a successful archiving we notify the archive event subscribers - srv.fire_archive_event(plugin_result.getFileId(), plugin_result.getFileVersion()) + srv.fire_archive_event(disk_info.getDiskId(), plugin_result.getFileId(), plugin_result.getFileVersion()) def findTargetNode(stream, srvObj, mimeType): """ diff --git a/src/ngamsServer/ngamsServer/ngamsServer.py b/src/ngamsServer/ngamsServer/ngamsServer.py index 13ab058f..90dbaa31 100644 --- a/src/ngamsServer/ngamsServer/ngamsServer.py +++ b/src/ngamsServer/ngamsServer/ngamsServer.py @@ -535,7 +535,7 @@ def show_threads(): msg.append(fmt % (t.name, t.ident, t.daemon)) logger.debug("Threads currently alive on process %d:\n%s", os.getpid(), '\n'.join(msg)) -archive_event = collections.namedtuple('archive_event', 'file_id file_version') +archive_event = collections.namedtuple('archive_event', 'disk_id file_id file_version server') class ngamsServer(object): """ @@ -751,9 +751,9 @@ def trigger_subscription(evt): plugin = loadPlugInEntryPoint(module, clazz)(**pars) self.archive_event_subscribers.append(plugin.handle_event) - def fire_archive_event(self, file_id, file_version): + def fire_archive_event(self, disk_id, file_id, file_version): """Passes down the archive event to each of the archive event subscriber""" - evt = archive_event(file_id, file_version) + evt = archive_event(disk_id, file_id, file_version, self) for s in self.archive_event_subscribers: try: s(evt)