MCPcopy Create free account
hub / github.com/omkarcloud/botasaurus / serializeUiOutputTask

Function serializeUiOutputTask

js/botasaurus-server-js/src/models.ts:139–154  ·  view source on GitHub ↗
(obj: Task, _: any)

Source from the content-addressed store, hash-verified

137 return taskName !== null ? taskName : `Task ${taskId}`;
138}
139function serializeUiOutputTask(obj: Task, _: any) {
140 const taskId = obj.id;
141
142 return {
143 id: taskId,
144 status: obj.status,
145 task_name: createTaskName(obj.task_name, taskId),
146 result_count: obj.result_count,
147 is_all_task: obj.is_all_task,
148 started_at: isoformat(obj.started_at),
149 finished_at: isoformat(obj.finished_at),
150 parent_task_id: obj.parent_task_id,
151 scraper_name: obj.scraper_name,
152 scraper_type: obj.scraper_type,
153 };
154 }
155
156function serializeUiDisplayTask(obj: Task): Partial<Task> {
157 return {

Callers

nothing calls this directly

Calls 2

createTaskNameFunction · 0.85
isoformatFunction · 0.70

Tested by

no test coverage detected