mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-06-22 00:57:24 +00:00
Implement takeLock composition step + tests
This commit only implements the action that a takeLock step results in. It does not add takeLock step generation logic to the state funnel yet. Signed-off-by: Christina Ying Wang <christina@balena.io>
This commit is contained in:
@ -97,6 +97,7 @@ interface CompositionStepArgs {
|
||||
noop: object;
|
||||
takeLock: {
|
||||
appId: number;
|
||||
services: string[];
|
||||
};
|
||||
releaseLock: {
|
||||
appId: number;
|
||||
@ -283,8 +284,8 @@ export function getExecutors(app: {
|
||||
noop: async () => {
|
||||
/* async noop */
|
||||
},
|
||||
takeLock: async () => {
|
||||
// TODO
|
||||
takeLock: async (step) => {
|
||||
await updateLock.takeLock(step.appId, step.services);
|
||||
},
|
||||
releaseLock: async (step) => {
|
||||
await updateLock.releaseLock(step.appId);
|
||||
|
Reference in New Issue
Block a user