cleanup
This commit is contained in:
parent
04ef01ee78
commit
26c3663287
@ -10,7 +10,15 @@ import (
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
func (a *MapBlockAccessor) FindNextLegacyBlocks(lastpos *coords.MapBlockCoords, limit int, layerfilter []layer.Layer) (*FindMapBlocksResult, error) {
|
||||
type FindNextLegacyBlocksResult struct {
|
||||
HasMore bool
|
||||
LastPos *coords.MapBlockCoords
|
||||
LastMtime int64
|
||||
List []*mapblockparser.MapBlock
|
||||
UnfilteredCount int
|
||||
}
|
||||
|
||||
func (a *MapBlockAccessor) FindNextLegacyBlocks(lastpos *coords.MapBlockCoords, limit int, layerfilter []layer.Layer) (*FindNextLegacyBlocksResult, error) {
|
||||
|
||||
fields := logrus.Fields{
|
||||
"x": lastpos.X,
|
||||
@ -26,7 +34,7 @@ func (a *MapBlockAccessor) FindNextLegacyBlocks(lastpos *coords.MapBlockCoords,
|
||||
return nil, err
|
||||
}
|
||||
|
||||
result := FindMapBlocksResult{}
|
||||
result := FindNextLegacyBlocksResult{}
|
||||
|
||||
mblist := make([]*mapblockparser.MapBlock, 0)
|
||||
var newlastpos *coords.MapBlockCoords
|
||||
|
@ -5,7 +5,6 @@ import (
|
||||
"mapserver/coords"
|
||||
"mapserver/db"
|
||||
"mapserver/eventbus"
|
||||
"mapserver/mapblockparser"
|
||||
|
||||
"time"
|
||||
|
||||
@ -31,11 +30,3 @@ func NewMapBlockAccessor(accessor db.DBAccessor) *MapBlockAccessor {
|
||||
Eventbus: eventbus.New(),
|
||||
}
|
||||
}
|
||||
|
||||
type FindMapBlocksResult struct {
|
||||
HasMore bool
|
||||
LastPos *coords.MapBlockCoords
|
||||
LastMtime int64
|
||||
List []*mapblockparser.MapBlock
|
||||
UnfilteredCount int
|
||||
}
|
||||
|
@ -10,7 +10,15 @@ import (
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
func (a *MapBlockAccessor) FindMapBlocksByMtime(lastmtime int64, limit int, layerfilter []layer.Layer) (*FindMapBlocksResult, error) {
|
||||
type FindMapBlocksByMtimeResult struct {
|
||||
HasMore bool
|
||||
LastPos *coords.MapBlockCoords
|
||||
LastMtime int64
|
||||
List []*mapblockparser.MapBlock
|
||||
UnfilteredCount int
|
||||
}
|
||||
|
||||
func (a *MapBlockAccessor) FindMapBlocksByMtime(lastmtime int64, limit int, layerfilter []layer.Layer) (*FindMapBlocksByMtimeResult, error) {
|
||||
|
||||
fields := logrus.Fields{
|
||||
"lastmtime": lastmtime,
|
||||
@ -24,7 +32,7 @@ func (a *MapBlockAccessor) FindMapBlocksByMtime(lastmtime int64, limit int, laye
|
||||
return nil, err
|
||||
}
|
||||
|
||||
result := FindMapBlocksResult{}
|
||||
result := FindMapBlocksByMtimeResult{}
|
||||
|
||||
mblist := make([]*mapblockparser.MapBlock, 0)
|
||||
var newlastpos *coords.MapBlockCoords
|
||||
|
Loading…
Reference in New Issue
Block a user