Skip to content
This repository has been archived by the owner on Jan 13, 2020. It is now read-only.

Commit

Permalink
Close metering session on close
Browse files Browse the repository at this point in the history
  • Loading branch information
JGoutin committed Oct 18, 2018
1 parent 035e801 commit 7b75b5a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apyfal/__init__.py
Expand Up @@ -16,7 +16,7 @@
See the License for the specific language governing permissions and
limitations under the License.
"""
__version__ = "1.2.2"
__version__ = "1.2.3"
__copyright__ = "Copyright 2018 Accelize"
__licence__ = "Apache 2.0"
__all__ = ['Accelerator', 'AcceleratorPoolExecutor', 'iter_accelerators',
Expand Down
7 changes: 5 additions & 2 deletions apyfal/client/syscall.py
Expand Up @@ -161,8 +161,11 @@ def _stop(self, info_dict):
Returns:
dict or None: response.
"""
return self._run_executable(
mode='2', output_json=str(_uuid()) if info_dict else None)
try:
return self._run_executable(
mode='2', output_json=str(_uuid()) if info_dict else None)
finally:
_systemctl('stop', 'meteringsession', 'meteringclient')

def _run_executable(
self, mode, input_file=None, output_file=None, input_json=None,
Expand Down

0 comments on commit 7b75b5a

Please sign in to comment.