mirror of
https://bitbucket.org/s_l_teichmann/mtsatellite
synced 2024-12-24 09:10:17 +01:00
mtwebmapper: Do not fire up too many base tile re-generator workers if there is not much to do.
This commit is contained in:
parent
33337d5df2
commit
58d30b1323
@ -100,7 +100,7 @@ func (tu *tileUpdater) doUpdates() {
|
|||||||
jobs := make(chan xz)
|
jobs := make(chan xz)
|
||||||
var done sync.WaitGroup
|
var done sync.WaitGroup
|
||||||
|
|
||||||
for i := 0; i < tu.workers; i++ {
|
for i, n := 0, min(tu.workers, len(changes)); i < n; i++ {
|
||||||
var client *common.RedisClient
|
var client *common.RedisClient
|
||||||
var err error
|
var err error
|
||||||
if client, err = common.NewRedisClient("tcp", tu.redisAddress); err != nil {
|
if client, err = common.NewRedisClient("tcp", tu.redisAddress); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user