Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
C
console
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
console
Commits
876560a3
Commit
876560a3
authored
Aug 25, 2021
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use existing archive only when archive record exists
parent
3b7d72ed
Pipeline
#4985
passed with stages
in 2 minutes and 48 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
console-api/src/packager/packager.service.ts
console-api/src/packager/packager.service.ts
+4
-3
No files found.
console-api/src/packager/packager.service.ts
View file @
876560a3
...
...
@@ -181,9 +181,10 @@ export class PackagerService extends ConsoleLogger {
const
archiveName
=
archiveTask
.
archiveFullPath
;
const
existing
=
await
this
.
s3
.
fileExists
(
archiveName
);
if
(
existing
)
{
archive
.
size
=
existing
.
Size
;
const
hash
=
await
this
.
appService
.
lookForExistingArchiveHash
(
archiveTask
.
path
);
if
(
hash
)
{
this
.
log
(
`Archive
${
archiveName
}
exists, skipping.`
);
archive
.
size
=
existing
.
Size
;
archive
.
hash
=
hash
;
return
archive
;
}
...
...
@@ -209,11 +210,11 @@ export class PackagerService extends ConsoleLogger {
child
.
stdout
.
on
(
'
data
'
,
(
chunk
)
=>
{
hashObject
.
update
(
chunk
);
});
if
(
existing
)
{
/*
if (existing) {
await childPromise;
archive.hash = hashObject.digest('hex');
return archive;
}
}
*/
const
uploadPromise
=
this
.
s3
.
uploadStream
(
archiveName
,
child
.
stdout
,
{
ContentType
:
'
application/tar+zstd
'
,
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment