Skip to content

Commit

Permalink
console touch up
Browse files Browse the repository at this point in the history
  • Loading branch information
krunch3r76 committed Feb 7, 2022
1 parent 5d1cbc6 commit f96715a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
6 changes: 4 additions & 2 deletions on_run_conclusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ def console_interface(nodeInfoIds, myModel):
debug.dlog(ss)
recordset = myModel.execute(ss)
records=recordset.fetchall()
print(f"\n\nnode address\tnode name\n model\tcost of procurement in GLM\n")

line1=f"node address{' '*(43-12)}\tnode name"
line2=f" model{' ' * (43-6)}\tcost of procurement in GLM"
print(f"\n\n{line1}\n{line2}")
print('-' * (len(line2)+4))
for row in records:
print(f"{row[0]}\t{row[1]}")
print(f" {row[2]}\t{row[3]}")
Expand Down
18 changes: 14 additions & 4 deletions spyu.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,13 +294,23 @@ async def __call__(self, CPUmax=Decimal("0.361"), ENVmax=Decimal("inf"), maxGlm=
if args.spy != None:
for element in args.spy:
if ',' in element:
input("WARNING, commas seen in node names passed as arguments to --spy. If this was not intentional please quit otherwise press enter to proceed")
break
try:
input("WARNING, commas seen in node names passed as arguments to --spy. If this was not intentional please quit otherwise press enter to proceed")
except KeyboardInterrupt:
print()
sys.exit(0)
else:
break
whitelist=set(args.spy)
os.environ['GNPROVIDER']=f'[{",".join(args.spy)}]'
else:
print("Using GNPROVIDER filterms environment variable to select nodes")
input("press enter to proceed")
try:
input("press enter to proceed")
except KeyboardInterrupt:
print()
sys.exit(0)


debug.dlog(f"---++++ os.environ['GNPROVIDER'] is {os.environ['GNPROVIDER']}")
whitelist = set(get_gnprovider_as_list())
Expand Down Expand Up @@ -350,7 +360,7 @@ async def __call__(self, CPUmax=Decimal("0.361"), ENVmax=Decimal("inf"), maxGlm=
on_run_conclusion(provisioner.nodeInfoIds, myModel)
"""


""" get results """
def get_results(self):
return self.mySummaryLogger.sum_invoices(), self.provisioner.nodeInfoIds, self.myModel

Expand Down

0 comments on commit f96715a

Please sign in to comment.