Skip to content

excessive database queries #141

Description

@buhman

There's some patterns like this:

cur = model.get_digest(stream)
if cur.count():
    return 'already exists'
else:
    model.insert(stream)

Digest is indexed, so catching DuplicateKeyError is sufficient. No idea who wrote this shit.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions