add enqueue spam command

pull/9/head
Konstantine Tsafatinos 2023-06-26 18:02:21 -04:00
parent 61ab42c118
commit 1cbb1dd7f3
1 changed files with 14 additions and 6 deletions

View File

@ -110,6 +110,7 @@ def download():
@click.option('--step', '-s', default=26) @click.option('--step', '-s', default=26)
@click.option('--seed', '-S', default=None) @click.option('--seed', '-S', default=None)
@click.option('--upscaler', '-U', default='x4') @click.option('--upscaler', '-U', default='x4')
@click.option('--jobs', '-j', default=1)
def enqueue( def enqueue(
account: str, account: str,
permission: str, permission: str,
@ -134,12 +135,19 @@ def enqueue(
}) })
binary = '' binary = ''
ec, out = cleos.push_action( if not kwargs['jobs']:
'telos.gpu', 'enqueue', [account, req, binary, reward], f'{account}@{permission}' ec, out = cleos.push_action(
) 'telos.gpu', 'enqueue', [account, req, binary, reward], f'{account}@{permission}'
)
print(collect_stdout(out)) print(collect_stdout(out))
assert ec == 0 assert ec == 0
else:
for i in kwargs['jobs']:
ec, out = cleos.push_action(
'telos.gpu', 'enqueue', [account, req, binary, reward], f'{account}@{permission}'
)
print(collect_stdout(out))
assert ec == 0
@skynet.command() @skynet.command()
@click.option('--loglevel', '-l', default='INFO', help='Logging level') @click.option('--loglevel', '-l', default='INFO', help='Logging level')