Example #1
0
  const done = (err) => {
    if (err) {
      // Finished prossing, can be prossed again
      logger.debug(`notifying on queue ${queueName}, itemId: ${item.get('id')}, FAILED`);
      queues = queues.setIn([queueName, item.get('id'), 'processing'], false);
      return;
    }

    // processed successfully, remove from queue
    logger.debug(`notifying on queue ${queueName}, itemId: ${item.get('id')}, SUCCESS`);
    queues = queues.deleteIn([queueName, item.get('id')]);
  };