getGlobalConfiguration = async logger => {
  const orgConfigValue = _.cloneDeep(config.get('jobs.trailingTrade'));

  orgConfigValue.symbols = Object.values(orgConfigValue.symbols);

  const savedConfigValue = await mongo.findOne(
    logger,
    'trailing-trade-common',
    {
      key: 'configuration'
    }
  );

  if (_.isEmpty(savedConfigValue)) {
    logger.info(
      'Could not find configuration from MongoDB, retrieve from initial configuration.'
    );

    // If it is empty, then global configuration is not stored in the
    await saveGlobalConfiguration(logger, orgConfigValue);
  }

  return _.mergeWith(savedConfigValue, orgConfigValue, (objValue, srcValue) => {
    if (_.isArray(objValue) || !_.isObject(objValue)) {
      return objValue;
    }
    return _.defaultsDeep(objValue, srcValue);
  });
}
Get global configuration from mongodb

@param {*} logger