feat(client): add metrics to queue status (#27)
* Add metrics to queue status * Update libs/client/src/types.ts Co-authored-by: Daniel Rochetti <daniel.rochetti@gmail.com> --------- Co-authored-by: Daniel Rochetti <daniel.rochetti@gmail.com>
This commit is contained in:
parent
7f2bb5e77d
commit
09c77be1f2
@ -13,13 +13,21 @@ export type RequestLog = {
|
||||
timestamp: string; // Using string to represent date-time format, but you could also use 'Date' type if you're going to construct Date objects.
|
||||
};
|
||||
|
||||
export type Metrics = {
|
||||
inference_time: number | null;
|
||||
};
|
||||
|
||||
export type QueueStatus =
|
||||
| {
|
||||
status: 'IN_PROGRESS' | 'COMPLETED';
|
||||
{
|
||||
status: 'IN_PROGRESS';
|
||||
response_url: string;
|
||||
logs: null | RequestLog[];
|
||||
}
|
||||
| {
|
||||
} | {
|
||||
status: 'COMPLETED';
|
||||
response_url: string;
|
||||
logs: null | RequestLog[];
|
||||
metrics: Metrics;
|
||||
} | {
|
||||
status: 'IN_QUEUE';
|
||||
queue_position: number;
|
||||
response_url: string;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user