Skip to content

Commit

Permalink
nsfs | wait for endpoint startup before namespace monitor registration
Browse files Browse the repository at this point in the history
Signed-off-by: Amit Prinz Setter <[email protected]>
  • Loading branch information
alphaprinz committed Oct 19, 2024
1 parent 8f1d6f8 commit 02e747f
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/endpoint/endpoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,14 @@ async function main(options = {}) {
if (internal_rpc_client && config.NAMESPACE_MONITOR_ENABLED) {
endpoint_stats_collector.instance().set_rpc_client(internal_rpc_client);

// Register a bg monitor on the endpoint
background_scheduler.register_bg_worker(new NamespaceMonitor({
name: 'namespace_fs_monitor',
client: internal_rpc_client,
should_monitor: nsr => Boolean(nsr.nsfs_config),
}));
setTimeout( () => {
// Register a bg monitor on the endpoint
background_scheduler.register_bg_worker(new NamespaceMonitor({
name: 'namespace_fs_monitor',
client: internal_rpc_client,
should_monitor: nsr => Boolean(nsr.nsfs_config),
}));
}, 1000 * 60);
}

if (config.ENABLE_SEMAPHORE_MONITOR) {
Expand Down

0 comments on commit 02e747f

Please sign in to comment.