Bulk Operation Finished Event

Event that fires when the bulk operation finishes.

Event name

bulk-finished

Request

  • Subscribe

  • Unsubscribe

cn.emit('add-topics', 'bulk-finished')
cn.emit('remove-topics', 'bulk-finished')

Response

Response contains the following fields:

Field Type Description

bulkId

String

ID of the finished bulk operation.

error

Object

Bulk operation error.

result

Object

Result of the bulk operation.

Example

Request

const comet = require('socket.io-client');

// Comet settings
const COMET_CONNECT_TIMEOUT = 5000;
const sessionId = "..."
const conf = {
    cometHost: 'https://example.com',
    cometPort: '1234',
};

const url = `${conf.cometHost}` + (conf.cometPort ? `:${conf.cometPort}` : '');
const cn = comet.connect(url, {
    query: { forceNew: true, sessionId },
    timeout: COMET_CONNECT_TIMEOUT,
});

cn.emit('add-topics', 'bulk-finished');

cn.on('bulk-finished', msg => {
      console.log(msg);
});

Response

{
  "bulkId":"49379096-aede-4729-872a-6c1f1165be08",
  "error":null,
  "result":[]
}