Skip to content

Commit

Permalink
fix: thread leak in receiver (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
DekusDenial authored Oct 10, 2024
1 parent 0c7d7f3 commit aaf3914
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion receiver.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ const onMessage = data => {
const buildConfig = fullBuildConfig.buildConfig || fullBuildConfig.cacheConfig;

if (jobType === 'clear') {
const threadCache = spawn('./lib/cache.js');
const job = `jobType: ${jobType}, cacheConfig: ${buildConfig}`;

logger.info(`processing ${job}`);
Expand All @@ -57,6 +56,7 @@ const onMessage = data => {
) {
// eslint-disable-next-line max-len
let dir2Clean = buildConfig.prefix !== '' ? `${cachePath}/${buildConfig.prefix}` : `${cachePath}`;
const threadCache = spawn('./lib/cache.js');

dir2Clean = `${dir2Clean}/${buildConfig.scope}/${buildConfig.pipelineId}`;

Expand Down

0 comments on commit aaf3914

Please sign in to comment.