MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / ListBySession

Method ListBySession

internal/bridge/taskmanager.go:128–139  ·  view source on GitHub ↗

ListBySession returns all tasks for a session (any state).

(sessionID string)

Source from the content-addressed store, hash-verified

126
127// ListBySession returns all tasks for a session (any state).
128func (tm *TaskManager) ListBySession(sessionID string) []*Task {
129 tm.mu.RLock()
130 defer tm.mu.RUnlock()
131
132 var out []*Task
133 for k, t := range tm.tasks {
134 if k.sessionID == sessionID {
135 out = append(out, t)
136 }
137 }
138 return out
139}
140
141// ActiveBySession returns tasks in Pending or Running state for a session.
142func (tm *TaskManager) ActiveBySession(sessionID string) []*Task {

Callers 1

TestTask_ListBySessionFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestTask_ListBySessionFunction · 0.76