Merge branch 'master' of https://gitea.nxsir.cn/nanxun/IM_NEW
This commit is contained in:
@@ -82,5 +82,10 @@ namespace FileService.Application.UploadFileTask
|
|||||||
|
|
||||||
return Result.Success(presignUrl);
|
return Result.Success(presignUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//public async Task<Result<UploadTaskResponse>> CompleteTaskAsync()
|
||||||
|
//{
|
||||||
|
// var taskCache = await redis.GetAsync();
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FileService.Application.UploadFileTask
|
||||||
|
{
|
||||||
|
public record UploadTaskCompleteCommand(string UploadSessionId, Guid userId,);
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
using AutoMapper;
|
using AutoMapper;
|
||||||
using FileService.Application.StorageContracts;
|
using FileService.Application.StorageContracts;
|
||||||
|
using FileService.Domain.Entities;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -16,6 +17,13 @@ namespace FileService.Application.UploadFileTask
|
|||||||
.ForMember(dest => dest.StorageLocation, opt => opt.MapFrom(src => src.Location))
|
.ForMember(dest => dest.StorageLocation, opt => opt.MapFrom(src => src.Location))
|
||||||
.ForMember(dest => dest.UploadSessionId, opt => opt.MapFrom(src => src.UploadSessionId))
|
.ForMember(dest => dest.UploadSessionId, opt => opt.MapFrom(src => src.UploadSessionId))
|
||||||
;
|
;
|
||||||
|
|
||||||
|
CreateMap<UploadTask, UploadTaskResponse>()
|
||||||
|
.ForMember(dest => dest.State, opt => opt.MapFrom(src => src.State.ToString()))
|
||||||
|
.ForMember(dest => dest.FileSize, opt => opt.MapFrom(src => src.FileSize.ToString()))
|
||||||
|
.ForMember(dest => dest.FileName, opt => opt.MapFrom(src => src.FileName.ToString()))
|
||||||
|
.ForMember(dest => dest.CheckSum, opt => opt.MapFrom(src => src.CheckSum.Value))
|
||||||
|
;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
using FileService.Domain;
|
||||||
|
using FileService.Domain.ValueObjects;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FileService.Application.UploadFileTask
|
||||||
|
{
|
||||||
|
public class UploadTaskResponse
|
||||||
|
{
|
||||||
|
public Guid Id { get; set; }
|
||||||
|
public Guid UploaderId { get; set; }
|
||||||
|
public Guid ConversationId { get; set; }
|
||||||
|
public string FileName { get; set; }
|
||||||
|
public long FileSize { get; set; }
|
||||||
|
public string ContentType { get; set; }
|
||||||
|
public StorageLocation StorageLocation { get; set; }
|
||||||
|
public string State { get; set; }
|
||||||
|
public string CheckSum { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
Vendored
+14
-1
@@ -87,7 +87,6 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def buildImage(serviceName, dockerfilePath) {
|
def buildImage(serviceName, dockerfilePath) {
|
||||||
|
|
||||||
def imageName = "${IMAGE_PREFIX}-${serviceName}:${IMAGE_TAG}"
|
def imageName = "${IMAGE_PREFIX}-${serviceName}:${IMAGE_TAG}"
|
||||||
@@ -111,4 +110,18 @@ def buildImage(serviceName, dockerfilePath) {
|
|||||||
sudo docker push ${REGISTRY}/${serviceName}:latest
|
sudo docker push ${REGISTRY}/${serviceName}:latest
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sh """
|
||||||
|
sudo docker rmi ${imageName} || true
|
||||||
|
sudo docker rmi ${latestName} || true
|
||||||
|
|
||||||
|
if [ -n "${REGISTRY}" ]; then
|
||||||
|
sudo docker rmi ${REGISTRY}/${serviceName}:${IMAGE_TAG} || true
|
||||||
|
sudo docker rmi ${REGISTRY}/${serviceName}:latest || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
sudo docker builder prune -f || true
|
||||||
|
"""
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user