Commit 00edf4e9 authored by nanahira's avatar nanahira

clean logs

parent 9984d2f3
Pipeline #25387 passed with stages
in 2 minutes and 16 seconds
...@@ -263,10 +263,10 @@ export class PackagerService extends ConsoleLogger { ...@@ -263,10 +263,10 @@ export class PackagerService extends ConsoleLogger {
}); });
}); });
const hashObject = createHash('sha256'); const hashObject = createHash('sha256');
let length = 0; // let length = 0;
child.stdout.on('data', (chunk) => { child.stdout.on('data', (chunk) => {
length += chunk.length; // length += chunk.length;
this.log(`Received ${length} bytes of archive ${archiveName}.`); // this.log(`Received ${length} bytes of archive ${archiveName}.`);
hashObject.update(chunk); hashObject.update(chunk);
}); });
...@@ -299,7 +299,7 @@ export class PackagerService extends ConsoleLogger { ...@@ -299,7 +299,7 @@ export class PackagerService extends ConsoleLogger {
archive.hash = hashObject.digest('hex'); archive.hash = hashObject.digest('hex');
await this.redis.set(`hash:${archive.path}`, archive.hash, 'EX', 60 * 60 * 24); await this.redis.set(`hash:${archive.path}`, archive.hash, 'EX', 60 * 60 * 24);
archive.size = object.Size; archive.size = object.Size;
this.log(`Finished archiving ${archiveName} with ${length} bytes.`); this.log(`Finished archiving ${archiveName}.`);
return archive; return archive;
} catch (e) { } catch (e) {
this.error(`Failed to archive ${archiveName}: ${e.toString()}`); this.error(`Failed to archive ${archiveName}: ${e.toString()}`);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment