mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-10-29 15:30:03 +08:00
Merge branch 'main' of github.com:openimsdk/open-im-server
This commit is contained in:
commit
45391510a3
19
.github/workflows/issue-translator.yml
vendored
Normal file
19
.github/workflows/issue-translator.yml
vendored
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
name: 'issue-translator'
|
||||||
|
on:
|
||||||
|
issue_comment:
|
||||||
|
types: [created]
|
||||||
|
issues:
|
||||||
|
types: [opened]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: usthe/issues-translate-action@v2.7
|
||||||
|
with:
|
||||||
|
BOT_GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
|
||||||
|
IS_MODIFY_TITLE: true
|
||||||
|
# not require, default false, . Decide whether to modify the issue title
|
||||||
|
# if true, the robot account @Issues-translate-bot must have modification permissions, invite @Issues-translate-bot to your project or use your custom bot.
|
||||||
|
CUSTOM_BOT_NOTE: Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
|
||||||
|
# not require. Customize the translation robot prefix message.
|
||||||
@ -290,6 +290,7 @@ func (t *thirdServer) apiAddress(prefix, name string) string {
|
|||||||
func (t *thirdServer) DeleteOutdatedData(ctx context.Context, req *third.DeleteOutdatedDataReq) (*third.DeleteOutdatedDataResp, error) {
|
func (t *thirdServer) DeleteOutdatedData(ctx context.Context, req *third.DeleteOutdatedDataReq) (*third.DeleteOutdatedDataResp, error) {
|
||||||
var conf config.Third
|
var conf config.Third
|
||||||
expireTime := time.UnixMilli(req.ExpireTime)
|
expireTime := time.UnixMilli(req.ExpireTime)
|
||||||
|
var deltotal int
|
||||||
findPagination := &sdkws.RequestPagination{
|
findPagination := &sdkws.RequestPagination{
|
||||||
PageNumber: 1,
|
PageNumber: 1,
|
||||||
ShowNumber: 1000,
|
ShowNumber: 1000,
|
||||||
@ -311,10 +312,8 @@ func (t *thirdServer) DeleteOutdatedData(ctx context.Context, req *third.DeleteO
|
|||||||
return nil, errs.Wrap(err)
|
return nil, errs.Wrap(err)
|
||||||
}
|
}
|
||||||
if int(count) < 1 && t.minio != nil {
|
if int(count) < 1 && t.minio != nil {
|
||||||
thumbnailKey, err := t.getMinioImageThumbnailKey(ctx, key)
|
thumbnailKey, _ := t.getMinioImageThumbnailKey(ctx, key)
|
||||||
if err != nil {
|
|
||||||
return nil, errs.Wrap(err)
|
|
||||||
}
|
|
||||||
t.s3dataBase.DeleteObject(ctx, thumbnailKey)
|
t.s3dataBase.DeleteObject(ctx, thumbnailKey)
|
||||||
t.s3dataBase.DelS3Key(ctx, conf.Object.Enable, needDelObjectKeys...)
|
t.s3dataBase.DelS3Key(ctx, conf.Object.Enable, needDelObjectKeys...)
|
||||||
t.s3dataBase.DeleteObject(ctx, key)
|
t.s3dataBase.DeleteObject(ctx, key)
|
||||||
@ -329,7 +328,9 @@ func (t *thirdServer) DeleteOutdatedData(ctx context.Context, req *third.DeleteO
|
|||||||
if total < int64(findPagination.ShowNumber) {
|
if total < int64(findPagination.ShowNumber) {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
deltotal += int(total)
|
||||||
}
|
}
|
||||||
|
log.ZDebug(ctx, "DeleteOutdatedData", "delete Total", deltotal)
|
||||||
return &third.DeleteOutdatedDataResp{}, nil
|
return &third.DeleteOutdatedDataResp{}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user