Skip to content

Commit

Permalink
fix issue with example where we didn't free a nested cell (#498)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmah42 authored Jan 23, 2024
1 parent cd525a0 commit cbef2c5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions examples/cells.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,16 @@ let nested_allocated = await cellService.allocate(<cells.CellServiceAllocateRequ
});
console.log('Allocated Nested:', nested_allocated)

let nested_started = await cellService.start(<cells.CellServiceStartRequest>{
cellName: nestedCellName,
executable: cells.Executable.fromPartial({
command: "/usr/bin/echo 'hello world'",
description: "say 'hello'",
name: "hello"
})
})
console.log('Started:', nested_started)

// [ List cellService ]
let listed = await cellService.list(<cells.CellServiceListRequest>{})
console.log('Listed:', listed)
Expand All @@ -82,6 +92,15 @@ let stopped = await cellService.stop(<cells.CellServiceStopRequest>{
})
console.log('Stopped:', stopped)

let nested_stopped = await cellService.stop(<cells.CellServiceStopRequest>{
cellName: nestedCellName,
executableName: "hello",
})

let nested_freed = await cellService.free(<cells.CellServiceFreeRequest>{
cellName: nestedCellName
});

// [ Free ]
let freed = await cellService.free(<cells.CellServiceFreeRequest>{
cellName
Expand Down
File renamed without changes.

0 comments on commit cbef2c5

Please sign in to comment.