Skip to content

Commit d007fde

Browse files
committed
Added suggested changes
1 parent bfac627 commit d007fde

File tree

3 files changed

+3
-34
lines changed

3 files changed

+3
-34
lines changed

packages/adapters/src/dockerode-docker-helper.ts

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -282,27 +282,7 @@ export class DockerodeDockerHelper implements IDockerHelper {
282282

283283
return Volumes.map(volume => volume.Name);
284284
}
285-
/**
286-
* Access to the value of volume's label
287-
* @param volumeName Volume name.
288-
* @param labelName Label name.
289-
*
290-
* @returns Promise which resolves when volume has been removed.
291-
*/
292-
async getLabelValue(volumeName: string, labelName: string): Promise<string | null> {
293-
try {
294-
// Get information about the Docker volume
295-
const volumeInfo = await this.dockerode.getVolume(volumeName).inspect();
296-
297-
// Access the labels property and retrieve the specific label
298-
const labelValue = volumeInfo.Labels ? volumeInfo.Labels[labelName] : null;
299-
300-
return labelValue;
301-
} catch (error) {
302-
this.logger.error(`Error reading Docker volume label: ${error}`);
303-
return null;
304-
}
305-
}
285+
306286
/**
307287
* Attaches to container streams.
308288
*

packages/adapters/src/types.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -250,16 +250,7 @@ export interface IDockerHelper {
250250
* @returns {Promise<DockerVolume[]>} List of existing volumes
251251
*/
252252
listVolumes: () => Promise<DockerVolume[]>;
253-
/**
254-
* Get value of a certain label in scramjet's volume with the proviede id
255-
*
256-
* @param {string} volumeName Volume name.
257-
*
258-
* @param {string} labelName label name.
259-
*
260-
* @returns {Promise<string | null>} The value of a label (null if it doesnt exist)
261-
*/
262-
getLabelValue: (volumeName: string, labelName: string) => Promise<string | null>
253+
263254
/**
264255
* Creates volume.
265256
*

packages/host/src/lib/host.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -713,8 +713,6 @@ export class Host implements IComponent {
713713

714714
const configs = await sequenceAdapter.list();
715715

716-
sequenceAdapter.logger.pipe(this.logger);
717-
718716
for (const config of configs) {
719717
this.logger.trace(`Sequence identified: ${config.id}`);
720718

@@ -786,7 +784,7 @@ export class Host implements IComponent {
786784
this.logger.trace(`Sequence identified: ${config.id}`);
787785

788786
await this.cpmConnector?.sendSequenceInfo(
789-
id, // parentId
787+
id,
790788
SequenceMessageCode.SEQUENCE_CREATED,
791789
config as unknown as GetSequenceResponse,);
792790

0 commit comments

Comments
 (0)