MCPcopy Create free account
hub / github.com/dmtcp/dmtcp / restore

Function restore

contrib/python/dmtcp.py:90–106  ·  view source on GitHub ↗
(sessionId = 0)

Source from the content-addressed store, hash-verified

88 return ckptRetVal == 2
89
90def restore(sessionId = 0):
91 if sessionId == 0:
92 if len(sessionList) == 0:
93 createSessionList()
94 if len(sessionList) == 0:
95 print('No checkpoint session found')
96 return
97 print('Restoring the latest session')
98 else:
99 if len(sessionList) == 0:
100 print('Please do a listSession to see the list of available sessions')
101 return
102 if sessionId < 1 or sessionId > len(sessionList):
103 return 'Invalid session id'
104
105 session = sessionList[sessionId - 1]
106 os.execlp('dmtcp_nocheckpoint', 'sh', session[1])
107
108
109def createSessionList():

Callers

nothing calls this directly

Calls 1

createSessionListFunction · 0.85

Tested by

no test coverage detected