mirror of https://github.com/skygpu/skynet.git
add enqueue spam command
parent
61ab42c118
commit
1cbb1dd7f3
|
@ -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,10 +135,17 @@ def enqueue(
|
||||||
})
|
})
|
||||||
binary = ''
|
binary = ''
|
||||||
|
|
||||||
|
if not kwargs['jobs']:
|
||||||
|
ec, out = cleos.push_action(
|
||||||
|
'telos.gpu', 'enqueue', [account, req, binary, reward], f'{account}@{permission}'
|
||||||
|
)
|
||||||
|
print(collect_stdout(out))
|
||||||
|
assert ec == 0
|
||||||
|
else:
|
||||||
|
for i in kwargs['jobs']:
|
||||||
ec, out = cleos.push_action(
|
ec, out = cleos.push_action(
|
||||||
'telos.gpu', 'enqueue', [account, req, binary, reward], f'{account}@{permission}'
|
'telos.gpu', 'enqueue', [account, req, binary, reward], f'{account}@{permission}'
|
||||||
)
|
)
|
||||||
|
|
||||||
print(collect_stdout(out))
|
print(collect_stdout(out))
|
||||||
assert ec == 0
|
assert ec == 0
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue