MCPcopy Index your code
hub / github.com/simstudioai/sim / getProgressMarkers

Function getProgressMarkers

apps/sim/lib/logs/execution/progress-markers.ts:210–232  ·  view source on GitHub ↗
(
  executionId: string
)

Source from the content-addressed store, hash-verified

208 * never wipes the only copy of markers that are still in Redis.
209 */
210export async function getProgressMarkers(
211 executionId: string
212): Promise<ExecutionProgressMarkers | null> {
213 const redis = getMarkerClient()
214 if (!redis) return {}
215
216 try {
217 const fields = await redis.hgetall(markerKey(executionId))
218 if (!fields || Object.keys(fields).length === 0) return {}
219
220 const result: ExecutionProgressMarkers = {}
221 const started = parseStartedMarker(fields[STARTED_FIELD])
222 if (started) result.lastStartedBlock = started
223 const completed = parseCompletedMarker(fields[COMPLETED_FIELD])
224 if (completed) result.lastCompletedBlock = completed
225 return result
226 } catch (error) {
227 logger.error(`Failed to read progress markers for execution ${executionId}`, {
228 error: toError(error).message,
229 })
230 return null
231 }
232}
233
234/**
235 * Delete the markers for an execution. Called at every terminal/pause boundary

Callers 4

fetchLogDetailFunction · 0.90
markExecutionAsFailedMethod · 0.90

Calls 6

toErrorFunction · 0.90
getMarkerClientFunction · 0.85
markerKeyFunction · 0.85
parseStartedMarkerFunction · 0.85
parseCompletedMarkerFunction · 0.85
errorMethod · 0.80

Tested by

no test coverage detected