def METHOD_NAME(engine: model.Engine, start_date: Optional[str] = None):
    if start_date:
        date = datetime.datetime.strptime(start_date, u'%Y-%m-%d')
    else:
        # No date given. See when we last have data for and get data
        # from 2 days before then in case new data is available.
        # If no date here then use 2011-01-01 as the start date
        sql = u'''SELECT tracking_date from tracking_summary
                    ORDER BY tracking_date DESC LIMIT 1;'''
        result = engine.execute(sql).fetchall()
        if result:
            date = result[0][u'tracking_date']
            date += datetime.timedelta(-2)
            # convert date to datetime
            combine = datetime.datetime.combine
            date = combine(date, datetime.time(0))
        else:
            date = datetime.datetime(2011, 1, 1)
    start_date_solrsync = date
    end_date = datetime.datetime.now()
    while date < end_date:
        stop_date = date + datetime.timedelta(1)
        update_tracking(engine, date)
        click.echo(u'tracking updated for {}'.format(date))
        date = stop_date
    update_tracking_solr(engine, start_date_solrsync)