reconfigureIndex = async (logger, configuration) => {
  logger.info('Reconfigure index');
  const {
    botOptions: {
      logs: { deleteAfter: logsDeleteAfter }
    }
  } = configuration;

  // Drop trailing-trade-logs-logs-idx
  try {
    await mongo.dropIndex(
      logger,
      'trailing-trade-logs',
      'trailing-trade-logs-logs-idx'
    );
  } catch (e) {
    /* istanbul ignore next */
    logger.info({ e }, "Cannot find index. But it's ok to ignore.");
  }

  // Create trailing-trade-logs-logs-idx

  await mongo.createIndex(
    logger,
    'trailing-trade-logs',
    { loggedAt: 1 },
    {
      name: 'trailing-trade-logs-logs-idx',
      background: true,
      expireAfterSeconds: logsDeleteAfter * 60
    }
  );
}
Reconfigure MongoDB index
@param {*} logger
@param {*} configuration