This commit is contained in:
parent
4c18ea3833
commit
15e374d7d0
|
|
@ -157,7 +157,7 @@ class InMemoryTaskManager:
|
||||||
task_id: Task ID
|
task_id: Task ID
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
Dictionary with task status information
|
Dictionary with task status information including all required fields
|
||||||
"""
|
"""
|
||||||
task = self.get_task(task_id)
|
task = self.get_task(task_id)
|
||||||
if not task:
|
if not task:
|
||||||
|
|
@ -166,9 +166,12 @@ class InMemoryTaskManager:
|
||||||
return {
|
return {
|
||||||
"task_id": task["task_id"],
|
"task_id": task["task_id"],
|
||||||
"status": task["status"],
|
"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"),
|
"progress": task.get("progress"),
|
||||||
"result": task.get("result"),
|
"result": task.get("result"),
|
||||||
"error": task.get("error"),
|
"error": task.get("error"),
|
||||||
|
"completed_at": task.get("completed_at"),
|
||||||
}
|
}
|
||||||
|
|
||||||
def delete_task(self, task_id: str):
|
def delete_task(self, task_id: str):
|
||||||
|
|
|
||||||
|
|
@ -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;
|
|
||||||
|
|
@ -4,9 +4,11 @@ const nextConfig: NextConfig = {
|
||||||
output: 'standalone',
|
output: 'standalone',
|
||||||
reactCompiler: true,
|
reactCompiler: true,
|
||||||
async rewrites() {
|
async rewrites() {
|
||||||
// Use BACKEND_URL env var, or fallback to public Railway URL
|
// In development: use localhost backend
|
||||||
// In Railway, services cannot use simple hostnames to communicate
|
// In production (Railway): use BACKEND_URL env var or fallback to Railway URL
|
||||||
const backendUrl = process.env.BACKEND_URL || "https://tradinaagents-backend.up.railway.app";
|
const isDev = process.env.NODE_ENV === 'development';
|
||||||
|
const backendUrl = process.env.BACKEND_URL ||
|
||||||
|
(isDev ? "http://localhost:8000" : "https://tradinaagents-backend.up.railway.app");
|
||||||
|
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue