feat: textJanitor release, fixes and improvements

This commit is contained in:
Cristian Vidmar 2023-03-09 16:37:45 +01:00
parent 36514ac518
commit 76574b2398
9 changed files with 14 additions and 12 deletions

View File

@ -8,4 +8,4 @@ A Contentful API code generator for Go. Features:
- Simplifies management/resolution of references
- Adds several utility functions for RichText from/to HTML conversion, assets handling and more
Full documentation available at [foomo.org](https://www.foomo.org/docs/backend/gocontentful/introduction)
Full documentation available at [foomo.org](https://www.foomo.org/docs/projects/cms/gocontentful/introduction)

View File

@ -616,7 +616,7 @@ func (cc *ContentfulClient) UpdateCache(ctx context.Context, contentTypes []stri
return cc.syncCache(ctxAtWork, contentTypes)
}
cc.cacheWorkerOnce.Do(func() {
go cc.cacheWorker(ctxAtWork, contentTypes, cacheAssets)
go cc.cacheWorker(ctx, contentTypes, cacheAssets)
})
if len(cc.cacheQueue) == 0 {
if cc.logFn != nil && cc.logLevel <= LogInfo {
@ -695,9 +695,9 @@ func (cc *ContentfulClient) syncCache(ctx context.Context, contentTypes []string
}
updateCacheForContentTypeAndEntity(ctx, cc, entry.Sys.ContentType.Sys.ID, entry.Sys.ID, entry, false)
case sysTypeDeletedEntry:
cc.Cache.idContentTypeMapGcLock.RLock()
cc.cacheMutex.idContentTypeMapGcLock.RLock()
contentType := cc.Cache.idContentTypeMap[entry.Sys.ID]
cc.Cache.idContentTypeMapGcLock.RUnlock()
cc.cacheMutex.idContentTypeMapGcLock.RUnlock()
updateCacheForContentTypeAndEntity(ctx, cc, contentType, entry.Sys.ID, entry, true)
default:
}

View File

@ -13,7 +13,7 @@ import (
"github.com/foomo/gocontentful/erm"
)
var VERSION = "v1.0.15"
var VERSION = "v1.0.16"
type contentfulRc struct {
ManagementToken string `json:"managementToken"`

View File

@ -1,4 +1,4 @@
// Code generated by https://github.com/foomo/gocontentful v1.0.16beta - DO NOT EDIT.
// Code generated by https://github.com/foomo/gocontentful v1.0.16 - DO NOT EDIT.
package testapi
import (

View File

@ -1,4 +1,4 @@
// Code generated by https://github.com/foomo/gocontentful v1.0.16beta - DO NOT EDIT.
// Code generated by https://github.com/foomo/gocontentful v1.0.16 - DO NOT EDIT.
package testapi
import "github.com/foomo/contentful"

View File

@ -1,4 +1,4 @@
// Code generated by https://github.com/foomo/gocontentful v1.0.16beta - DO NOT EDIT.
// Code generated by https://github.com/foomo/gocontentful v1.0.16 - DO NOT EDIT.
package testapi
import (
@ -650,7 +650,7 @@ func (cc *ContentfulClient) UpdateCache(ctx context.Context, contentTypes []stri
return cc.syncCache(ctxAtWork, contentTypes)
}
cc.cacheWorkerOnce.Do(func() {
go cc.cacheWorker(ctxAtWork, contentTypes, cacheAssets)
go cc.cacheWorker(ctx, contentTypes, cacheAssets)
})
if len(cc.cacheQueue) == 0 {
if cc.logFn != nil && cc.logLevel <= LogInfo {
@ -729,7 +729,9 @@ func (cc *ContentfulClient) syncCache(ctx context.Context, contentTypes []string
}
updateCacheForContentTypeAndEntity(ctx, cc, entry.Sys.ContentType.Sys.ID, entry.Sys.ID, entry, false)
case sysTypeDeletedEntry:
cc.cacheMutex.idContentTypeMapGcLock.RLock()
contentType := cc.Cache.idContentTypeMap[entry.Sys.ID]
cc.cacheMutex.idContentTypeMapGcLock.RUnlock()
updateCacheForContentTypeAndEntity(ctx, cc, contentType, entry.Sys.ID, entry, true)
default:
}

View File

@ -1,4 +1,4 @@
// Code generated by https://github.com/foomo/gocontentful v1.0.16beta - DO NOT EDIT.
// Code generated by https://github.com/foomo/gocontentful v1.0.16 - DO NOT EDIT.
package testapi
import (

View File

@ -1,4 +1,4 @@
// Code generated by https://github.com/foomo/gocontentful v1.0.16beta - DO NOT EDIT.
// Code generated by https://github.com/foomo/gocontentful v1.0.16 - DO NOT EDIT.
package testapi
import (

View File

@ -1,4 +1,4 @@
// Code generated by https://github.com/foomo/gocontentful v1.0.16beta - DO NOT EDIT.
// Code generated by https://github.com/foomo/gocontentful v1.0.16 - DO NOT EDIT.
package testapi
import (