mirror of
https://github.com/stashapp/stash.git
synced 2025-12-06 08:26:00 +01:00
* Refactor session and plugin code * Add context to job tasks * Show hooks in plugins page * Refactor session management
28 lines
391 B
Go
28 lines
391 B
Go
package utils
|
|
|
|
import (
|
|
"context"
|
|
"time"
|
|
)
|
|
|
|
type valueOnlyContext struct {
|
|
context.Context
|
|
}
|
|
|
|
func (valueOnlyContext) Deadline() (deadline time.Time, ok bool) {
|
|
return
|
|
}
|
|
|
|
func (valueOnlyContext) Done() <-chan struct{} {
|
|
return nil
|
|
}
|
|
|
|
func (valueOnlyContext) Err() error {
|
|
return nil
|
|
}
|
|
|
|
func ValueOnlyContext(ctx context.Context) context.Context {
|
|
return valueOnlyContext{
|
|
ctx,
|
|
}
|
|
}
|