Skip to content

Commit 0fe21e1

Browse files
committed
Drop unused var
1 parent f695c94 commit 0fe21e1

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

cmd/state-svc/internal/resolver/resolver.go

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,6 @@ type Resolver struct {
4040
anForClient *sync.Client // Use separate client for events sent through service so we don't contaminate one with the other
4141
rtwatch *rtwatcher.Watcher
4242
auth *authentication.Auth
43-
44-
// mostRecentActivity records the most recent user activity that was sent to the resolver.
45-
// This is meant to focus on user activity. If ever we start polling the svc without user activity then the
46-
// intelligence behind this will need to be updated.
47-
mostRecentActivity *time.Time
4843
}
4944

5045
// jwtKeepAliveDuration determines how long after the last state tool interaction we want to keep the JWT alive
@@ -75,7 +70,6 @@ func New(cfg *config.Instance, an *sync.Client, auth *authentication.Auth) (*Res
7570

7671
pollRateDuration := time.Duration(int64(time.Millisecond) * pollRate)
7772

78-
mostRecentActivity := ptr.To(time.Now())
7973
pollAuth := poller.New(pollRateDuration, func() (interface{}, error) {
8074
if auth.SyncRequired() {
8175
return nil, auth.Sync()
@@ -96,7 +90,6 @@ func New(cfg *config.Instance, an *sync.Client, auth *authentication.Auth) (*Res
9690
anForClient,
9791
rtwatcher.New(cfg, anForClient),
9892
auth,
99-
mostRecentActivity,
10093
}, nil
10194
}
10295

@@ -110,10 +103,7 @@ func (r *Resolver) Close() error {
110103

111104
// Seems gqlgen supplies this so you can separate your resolver and query resolver logic
112105
// So far no need for this, so we're pointing back at ourselves..
113-
func (r *Resolver) Query() genserver.QueryResolver {
114-
*r.mostRecentActivity = time.Now()
115-
return r
116-
}
106+
func (r *Resolver) Query() genserver.QueryResolver { return r }
117107

118108
func (r *Resolver) Version(ctx context.Context) (*graph.Version, error) {
119109
defer func() { handlePanics(recover(), debug.Stack()) }()

0 commit comments

Comments
 (0)