Documentation
¶
Index ¶
Constants ¶
View Source
const ( TaskQueue = "api-page-cache" WorkflowID = "api-page-cache" )
Variables ¶
This section is empty.
Functions ¶
func PageCacheWorkflow ¶
func PageCacheWorkflow(ctx temporalworkflow.Context, iteration int) error
PageCacheWorkflow is a long-running workflow that refreshes all page caches every 30s. It uses continue-as-new after 60 iterations (~30 min) to keep workflow history bounded.
Types ¶
type Activities ¶
type Activities struct {
Log *slog.Logger
API *handlers.API
// contains filtered or unexported fields
}
Activities holds the logger and API deps for the refresh activity.
func (*Activities) RefreshCaches ¶
func (a *Activities) RefreshCaches(ctx context.Context) error
RefreshCaches refreshes all page cache entries, writing results to Postgres.
func (*Activities) RefreshLatestCaches ¶
func (a *Activities) RefreshLatestCaches(ctx context.Context) error
RefreshLatestCaches refreshes just the fast-cadence entries (latest slots slice).
Click to show internal directories.
Click to hide internal directories.