feat: migrate task jobs to workflow notifications + timeline
This commit is contained in:
@@ -6,6 +6,7 @@ import {
|
||||
getLatestPortfolioInsight,
|
||||
getPortfolioSummary,
|
||||
getTask,
|
||||
getTaskTimeline,
|
||||
listFilings,
|
||||
listHoldings,
|
||||
listRecentTasks,
|
||||
@@ -126,10 +127,18 @@ export function taskQueryOptions(taskId: string) {
|
||||
});
|
||||
}
|
||||
|
||||
export function recentTasksQueryOptions(limit = 20) {
|
||||
export function taskTimelineQueryOptions(taskId: string) {
|
||||
return queryOptions({
|
||||
queryKey: queryKeys.recentTasks(limit),
|
||||
queryFn: () => listRecentTasks(limit),
|
||||
queryKey: queryKeys.taskTimeline(taskId),
|
||||
queryFn: () => getTaskTimeline(taskId),
|
||||
staleTime: 5_000
|
||||
});
|
||||
}
|
||||
|
||||
export function recentTasksQueryOptions(limit = 20) {
|
||||
return queryOptions({
|
||||
queryKey: queryKeys.recentTasks(limit),
|
||||
queryFn: () => listRecentTasks({ limit }),
|
||||
staleTime: 5_000
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user