def generate_release_records(query_list):
    """Creates the DB records to be lookedup by the release
    mechanisim
    """
    for record in query_list:
        try:
            rec = Release(uuid=record['uuid'], timestamp=record['timestamp'],
            message_id=record['id'])
            rec.save()
        except IntegrityError:
            pass
def generate_release_records(query_list):
    """
    Creates the DB records to be lookedup by the release
    mechanisim
    """
    from baruwa.messages.models import Release
    for record in query_list:
        try:
            rec = Release(uuid=record['uuid'],
                          timestamp=record['timestamp'],
                          message_id=record['id'])
            rec.save()
        except IntegrityError:
            pass
def generate_release_records(query_list):
    """
    Creates the DB records to be lookedup by the release
    mechanisim
    """
    from baruwa.messages.models import Release

    for record in query_list:
        try:
            # if not email_re.match(user.email):
            #     release_address = user.username
            # else:
            #     release_address = user.email
            rec = Release(uuid=record["uuid"], timestamp=record["timestamp"], message_id=record["id"])
            rec.save()
        except:
            pass