mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-08 19:16:35 +08:00
refactoring scheduled tasks
This commit is contained in:
@@ -108,3 +108,7 @@ func (o *S3Mongo) FindExpirationObject(ctx context.Context, engine string, expir
|
||||
"group": bson.M{"$in": needDelType},
|
||||
}, opt)
|
||||
}
|
||||
|
||||
func (o *S3Mongo) GetKeyCount(ctx context.Context, engine string, key string) (int64, error) {
|
||||
return mongoutil.Count(ctx, o.coll, bson.M{"engine": engine, "key": key})
|
||||
}
|
||||
|
||||
@@ -26,4 +26,5 @@ type ObjectInfo interface {
|
||||
Take(ctx context.Context, engine string, name string) (*model.Object, error)
|
||||
Delete(ctx context.Context, engine string, name []string) error
|
||||
FindExpirationObject(ctx context.Context, engine string, expiration time.Time, needDelType []string, count int64) ([]*model.Object, error)
|
||||
GetKeyCount(ctx context.Context, engine string, key string) (int64, error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user