'Get a list of recent codenames used for 300x100 ads.
The 300x100 ads get a codename that looks like "fullname_campaign".
This function gets a list of recent campaigns.'

@classmethod
@memoize_traffic(time=3600)
def recent_codenames(cls, fullname):

    time_points = get_time_points('day')
    query = Session.query(distinct(cls.codename).label('codename')).filter(cls.date.in_(time_points)).filter(cls.codename.startswith(fullname))
    return [row.codename for row in query]
