mirror of https://github.com/skygpu/skynet.git
convert all push_action funcs to async a_push_action
parent
f17f11e5f3
commit
d680ea9b72
|
@ -250,12 +250,20 @@ def dequeue(
|
||||||
'user', node_url, None, None)
|
'user', node_url, None, None)
|
||||||
|
|
||||||
with open_cleos(node_url, key=key) as cleos:
|
with open_cleos(node_url, key=key) as cleos:
|
||||||
ec, out = cleos.push_action(
|
res = trio.run(cleos.a_push_action,
|
||||||
'telos.gpu', 'dequeue', [account, request_id], f'{account}@{permission}'
|
'telos.gpu',
|
||||||
|
'dequeue',
|
||||||
|
{
|
||||||
|
'user': Name(account),
|
||||||
|
'request_id': request_id,
|
||||||
|
},
|
||||||
|
account, key, permission,
|
||||||
|
# [account, request_id], f'{account}@{permission}'
|
||||||
)
|
)
|
||||||
|
print(res)
|
||||||
|
# print(collect_stdout(out))
|
||||||
|
# assert ec == 0
|
||||||
|
|
||||||
print(collect_stdout(out))
|
|
||||||
assert ec == 0
|
|
||||||
|
|
||||||
@skynet.command()
|
@skynet.command()
|
||||||
@click.option(
|
@click.option(
|
||||||
|
@ -284,12 +292,20 @@ def config(
|
||||||
node_url, _, _ = load_endpoint_info(
|
node_url, _, _ = load_endpoint_info(
|
||||||
'user', node_url, None, None)
|
'user', node_url, None, None)
|
||||||
with open_cleos(node_url, key=key) as cleos:
|
with open_cleos(node_url, key=key) as cleos:
|
||||||
ec, out = cleos.push_action(
|
res = trio.run(cleos.a_push_action,
|
||||||
'telos.gpu', 'config', [token_contract, token_symbol], f'{account}@{permission}'
|
'telos.gpu',
|
||||||
|
'config',
|
||||||
|
{
|
||||||
|
'token_contract': token_contract,
|
||||||
|
'token_symbol': token_symbol,
|
||||||
|
},
|
||||||
|
account, key, permission,
|
||||||
|
# [token_contract, token_symbol],
|
||||||
|
# f'{account}@{permission}'
|
||||||
)
|
)
|
||||||
|
print(res)
|
||||||
print(collect_stdout(out))
|
# print(collect_stdout(out))
|
||||||
assert ec == 0
|
# assert ec == 0
|
||||||
|
|
||||||
@skynet.command()
|
@skynet.command()
|
||||||
@click.option(
|
@click.option(
|
||||||
|
|
Loading…
Reference in New Issue