add unbind flow execution Signed-off-by: Jens Langhammer <jens@goauthentik.io> Signed-off-by: Jens Langhammer <jens@goauthentik.io>
		
			
				
	
	
		
			17 lines
		
	
	
		
			409 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			409 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package ak
 | 
						|
 | 
						|
import (
 | 
						|
	"context"
 | 
						|
	"time"
 | 
						|
)
 | 
						|
 | 
						|
func (a *APIController) startPeriodicalTasks() {
 | 
						|
	ctx, canc := context.WithCancel(context.Background())
 | 
						|
	defer canc()
 | 
						|
	go a.Server.TimerFlowCacheExpiry(ctx)
 | 
						|
	for range time.Tick(time.Duration(a.GlobalConfig.CacheTimeoutFlows) * time.Second) {
 | 
						|
		a.logger.WithField("timer", "cache-timeout").Debug("Running periodical tasks")
 | 
						|
		a.Server.TimerFlowCacheExpiry(ctx)
 | 
						|
	}
 | 
						|
}
 |