Exemple #1
0
def neko(private_key):
    app.app_context().push()
    while True:
        Block.sync()
        block = User(private_key).create_block(
            Move.query.filter_by(block=None).limit(20).all(),
            click=click,
        )
        if block:
            block.broadcast()
            click.echo(block)
Exemple #2
0
def neko(private_key):
    app.app_context().push()
    Client(os.environ.get('SENTRY_DSN'))

    while True:
        Block.sync()
        block = User(private_key).create_block(
            [
                m for m in Move.query.filter_by(block=None).limit(20).all()
                if m.valid
            ],
            click=click,
        )
        if block:
            block.broadcast()
            click.echo(block)