Merge lp:~kissiel/checkbox/session-assistant-improvements into lp:checkbox

Proposed by Maciej Kisielewski
Status: Merged
Approved by: Zygmunt Krynicki
Approved revision: 3965
Merged at revision: 3965
Proposed branch: lp:~kissiel/checkbox/session-assistant-improvements
Merge into: lp:checkbox
Diff against target: 29 lines (+19/-0)
1 file modified
plainbox/plainbox/impl/session/assistant.py (+19/-0)
To merge this branch: bzr merge lp:~kissiel/checkbox/session-assistant-improvements
Reviewer Review Type Date Requested Status
Zygmunt Krynicki (community) Approve
Review via email: mp+269500@code.launchpad.net

Description of the change

This MR adds the missing docstring to resume_session method

To post a comment you must log in.
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

+1, thanks :-)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plainbox/plainbox/impl/session/assistant.py'
2--- plainbox/plainbox/impl/session/assistant.py 2015-08-28 10:59:29 +0000
3+++ plainbox/plainbox/impl/session/assistant.py 2015-08-28 13:11:47 +0000
4@@ -376,6 +376,25 @@
5
6 @raises(KeyError, UnexpectedMethodCall)
7 def resume_session(self, session_id: str) -> 'SessionMetaData':
8+ """
9+ Resume a session.
10+
11+ :param session_id:
12+ The identifier of the session to resume.
13+ :returns:
14+ Resumed session metadata.
15+ :raises KeyError:
16+ If the session with a given session_id cannot be found.
17+ :raises UnexpectedMethodCall:
18+ If the call is made at an unexpected time. Do not catch this error.
19+ It is a bug in your program. The error message will indicate what
20+ is the likely cause.
21+
22+ This method restores internal state of the plainbox runtime as it was
23+ the last time session assistant did a checkpoint, i.e. session
24+ assistant's clients commited any information (e.g. saves job result,
25+ runs bootstrapping, updates app blob, etc.)
26+ """
27 UsageExpectation.of(self).enforce()
28 all_units = list(itertools.chain(
29 *[p.unit_list for p in self._selected_providers]))

Subscribers

People subscribed via source and target branches