forked from 3wordchant/capsul-flask
account-balance cli command
This commit is contained in:
parent
a9a4c4448c
commit
b3c655bc47
@ -62,6 +62,18 @@ def sql_script(f, c):
|
|||||||
|
|
||||||
model.connection.commit()
|
model.connection.commit()
|
||||||
|
|
||||||
|
@bp.cli.command('account-balance')
|
||||||
|
@click.option('-u', help='users email address')
|
||||||
|
@with_appcontext
|
||||||
|
def account_balance(u):
|
||||||
|
vms = get_model().list_vms_for_account(u)
|
||||||
|
payments = get_model().list_payments_for_account(u)
|
||||||
|
click.echo(".")
|
||||||
|
click.echo(".")
|
||||||
|
click.echo(get_account_balance(vms, payments, datetime.utcnow()))
|
||||||
|
click.echo(".")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@bp.cli.command('cron-task')
|
@bp.cli.command('cron-task')
|
||||||
@with_appcontext
|
@with_appcontext
|
||||||
|
Loading…
Reference in New Issue
Block a user