fix4
This commit is contained in:
@@ -88,7 +88,8 @@ const ProcessingPage = () => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const intervalIds = Object.entries(tasks).map(([key, task]) => {
|
const intervalIds = Object.entries(tasks).map(([key, task]) => {
|
||||||
if (task && (task.state === 'PENDING' || task.state === 'PROGRESS')) {
|
// FIX: Ensure the task and its status_url exist before starting to poll
|
||||||
|
if (task && task.status_url && (task.state === 'PENDING' || task.state === 'PROGRESS')) {
|
||||||
const intervalId = setInterval(async () => {
|
const intervalId = setInterval(async () => {
|
||||||
try {
|
try {
|
||||||
const updatedTask = await pollTaskStatus(task.status_url);
|
const updatedTask = await pollTaskStatus(task.status_url);
|
||||||
|
Reference in New Issue
Block a user