عدد العمل

نظرة عامة

تنفيذ واحد : اين هو ، ما هي كل خطوة تُنتَج ، والأربعة امور التي يمكنك ان تفعل بها — الانتظار ، الاستئناف ، اعادة المحاولة ، الغاء .

5 methods5 statusessurvives your process
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

الاستدعاءالوظيفة
درجةتعيد قراءة حالتها.
حتى تصل إلى وضعية سميتها
resume(stepId, data)يُعد خطوة إنسانية في انتظارك
Tr rethيديره مرة أخرى من خطوة، حفظ ما جاء قبل ذلك.
إلغاء ()-يوقفه

ما الذي تحتفظ به البيانات

run.data;
// {
//   id, workflowId, status: "running" | "waiting" | "succeeded" | "failed" | "cancelled",
//   input: { … },
//   steps: [{ id, type, status, output, credits, error, warnings, attempts, startedAt, endedAt }],
//   credits, startedAt, endedAt
// }
run.data
# {
#   "id", "workflowId", "status": "running" | "waiting" | "succeeded" | "failed" | "cancelled",
#   "input": {…},
#   "steps": [{"id", "type", "status", "output", "credits", "error", "warnings", "attempts", "startedAt", "endedAt"}],
#   "credits", "startedAt", "endedAt"
# }

ألف - الحالات الخمسة

الوضعالمعنىما يمكنك فعله
runningقيد التنفيذ.cancel()
waitingوتوقفت عند خطوة بشريةresume() · cancel()
succeededتم الانتهاء.—
failedخطوة واحدة فاشلة.retry()
cancelled-مُنَهَضَةٌ.—

كل طريقة تحديث الجسم

refresh(), resume(), retry() and cancel() all replace data with what came back and return the same instance — so a reference you hold stays current.

إنها مجرد لقطة حتى تُنْقِلها

فالركض على المنصة دون ان يخبركم : قراءة البيانات مرتين دون ان تُنعش تعطي الجواب نفسه .