async function activityIsEligible(activity, verbose = false) {
  const { id = 0 } = activity;

  if (verbose) {
    console.log(`Checking activity ${id}`);
  }

  const exists = await Activity.findById(id);
  if (exists) {
    if (verbose) {
      console.log(`Activity ${id} is already in the database.`);
    }
    return false;
  }

  return activityCouldHaveLaps(activity, verbose);
}
/**
 * Should activity be checked for laps? Must be longer than min distance and
 * starting or ending within allowed radius of park center
 *
 * @param {Int} activity.id
 * @param {Bool} activity.trainer
 * @param {Bool} activity.manual
 * @param {Array} activity.start_latlng
 * @param {Array} activity.end_latlng
 * @param {Float} activity.distance
 * @param {Bool} verbose Defaults to false
 * @return {Bool}
 */
Should activity be checked for laps. Must be longer than min distance and
starting or ending within allowed radius of park center


Should activity be checked for laps . Must be longer than min distance and starting or ending within allowed radius of park center
async function activityIsEligible(activity, verbose = false) {
  const { id = 0 } = activity;
  if (verbose) {
    console.log(`Checking activity ${id}`);
  }
  const exists = await Activity.findById(id);
  if (exists) {
    if (verbose) {
      console.log(`Activity ${id} is already in the database.`);
    }
    return false;
  }
  return activityCouldHaveLaps(activity, verbose);
}
async function activityIsEligible ( activity , verbose = false ) { const { id = 0 } = activity ; if ( verbose ) { console . log ( ` ${ id } ` ) ; } const exists = await Activity . findById ( id ) ; if ( exists ) { if ( verbose ) { console . log ( ` ${ id } ` ) ; } return false ; } return activityCouldHaveLaps ( activity , verbose ) ; }
Should activity be checked for laps?
Should activity be checked for laps?