Skip to content

Commit fdd041c

Browse files
authored
bucket notifications - use node name in eventSource for NC (#8983)
Signed-off-by: Amit Prinz Setter <[email protected]>
1 parent 6db9733 commit fdd041c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/util/notifications_util.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,10 +513,11 @@ function compose_notification_test(req) {
513513

514514
function _get_system_name(req) {
515515

516+
//in NC case - return node name
516517
if (req && req.object_sdk && req.object_sdk.nsfs_system) {
517-
const name = Object.keys(req.object_sdk.nsfs_system)[0];
518+
const name = process.env.NODE_NAME || os.hostname();
518519
return name;
519-
} else {
520+
} else { //in containerized - return system's name
520521
//see comment on Notificator._can_run() for the require here
521522
const system_store = require('../server/system_services/system_store').get_instance();
522523
return system_store.data.systems[0].name;

0 commit comments

Comments
 (0)