This commit is contained in:
MarkLo 2025-11-21 21:53:16 +08:00
parent 4c18ea3833
commit 15e374d7d0
3 changed files with 9 additions and 21 deletions

View File

@ -157,7 +157,7 @@ class InMemoryTaskManager:
task_id: Task ID
Returns:
Dictionary with task status information
Dictionary with task status information including all required fields
"""
task = self.get_task(task_id)
if not task:
@ -166,9 +166,12 @@ class InMemoryTaskManager:
return {
"task_id": task["task_id"],
"status": task["status"],
"created_at": task.get("created_at"),
"updated_at": task.get("updated_at", task.get("created_at")), # Fallback to created_at if updated_at not set
"progress": task.get("progress"),
"result": task.get("result"),
"error": task.get("error"),
"completed_at": task.get("completed_at"),
}
def delete_task(self, task_id: str):

View File

@ -1,17 +0,0 @@
const nextConfig = {
output: 'standalone',
async rewrites() {
// Use BACKEND_URL env var, or fallback to public Railway URL
// In Railway, services cannot use simple hostnames to communicate
const backendUrl = process.env.BACKEND_URL || "https://tradinaagents-backend.up.railway.app";
return [
{
source: "/api/:path*",
destination: `${backendUrl}/api/:path*`,
},
];
},
};
export default nextConfig;

View File

@ -4,9 +4,11 @@ const nextConfig: NextConfig = {
output: 'standalone',
reactCompiler: true,
async rewrites() {
// Use BACKEND_URL env var, or fallback to public Railway URL
// In Railway, services cannot use simple hostnames to communicate
const backendUrl = process.env.BACKEND_URL || "https://tradinaagents-backend.up.railway.app";
// In development: use localhost backend
// In production (Railway): use BACKEND_URL env var or fallback to Railway URL
const isDev = process.env.NODE_ENV === 'development';
const backendUrl = process.env.BACKEND_URL ||
(isDev ? "http://localhost:8000" : "https://tradinaagents-backend.up.railway.app");
return [
{