mirror of
https://github.com/foomo/gocontentful.git
synced 2025-10-16 12:25:39 +00:00
feat: textJanitor release, fixes and improvements
This commit is contained in:
parent
36514ac518
commit
76574b2398
@ -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)
|
||||
|
||||
@ -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:
|
||||
}
|
||||
|
||||
2
main.go
2
main.go
@ -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"`
|
||||
|
||||
@ -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 (
|
||||
|
||||
@ -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"
|
||||
|
||||
@ -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:
|
||||
}
|
||||
|
||||
@ -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 (
|
||||
|
||||
@ -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 (
|
||||
|
||||
@ -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 (
|
||||
|
||||
Loading…
Reference in New Issue
Block a user