MCPcopy Create free account
hub / github.com/astercloud/aster / GetOrCreateSession

Method GetOrCreateSession

pkg/workflow/workflow.go:259–265  ·  view source on GitHub ↗

GetOrCreateSession 获取或创建会话

(sessionID, userID string)

Source from the content-addressed store, hash-verified

257
258// GetOrCreateSession 获取或创建会话
259func (w *Workflow) GetOrCreateSession(sessionID, userID string) *WorkflowSession {
260 session, err := w.GetSession(sessionID)
261 if err == nil && session != nil {
262 return session
263 }
264 return w.CreateSession(sessionID, userID)
265}
266
267// ===== 运行管理 =====
268

Callers 1

ExecuteMethod · 0.95

Calls 2

GetSessionMethod · 0.95
CreateSessionMethod · 0.95

Tested by

no test coverage detected