Skip to content

--batch-size 1 doesn't seem to commit for every item #364

@simonw

Description

@simonw

I'm trying this, but it doesn't seem to write anything to the database file until I hit CTRL+C:

heroku logs --app=simonwillisonblog --tail | grep 'measure#nginx.service' | \
  sqlite-utils insert /tmp/herokutail.db log - --import re --convert "$(cat <<EOD
    r = re.compile(r'([^\s=]+)=(?:"(.*?)"|(\S+))')
    pairs = {}
    for key, value1, value2 in r.findall(line):
        pairs[key] = value1 or value2
    return pairs
EOD
)" --lines --batch-size 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions