Skip to content

Commit

Permalink
fix for status in various situations
Browse files Browse the repository at this point in the history
  • Loading branch information
awicenec committed Aug 23, 2021
1 parent dde980f commit df28e36
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 32 deletions.
Binary file not shown.
30 changes: 0 additions & 30 deletions daliuge-engine/.coveragerc

This file was deleted.

7 changes: 5 additions & 2 deletions daliuge-engine/dlg/manager/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,13 @@ def getSessions(self):
@daliuge_aware
def getSessionInformation(self, sessionId):
status = self.dm.getSessionStatus(sessionId)
if status[list(status.keys())[0]] > 0: # Pristine state sessions don't have a graph, yet.
if type(status) is dict:
graphDict = self.dm.getGraph(sessionId)
else:
elif type(status) is int:
graphDict = self.dm.getGraph(sessionId)
elif type(status[list(status.keys())[0]]) is int: # Pristine state sessions don't have a graph, yet.
graphDict = {}
status = 0
return {'status': status, 'graph': graphDict}

@daliuge_aware
Expand Down
7 changes: 7 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# pytest.ini
[pytest]
minversion = 6.0
addopts = -ra -q
testpaths =
daliuge-engine/test
daliuge-translator/test

0 comments on commit df28e36

Please sign in to comment.