mirror of
https://github.com/hibiken/asynqmon.git
synced 2025-08-23 22:28:43 +08:00
Adjust payload field to print content if bytes are printable
This commit is contained in:
@@ -242,7 +242,7 @@ export interface DailyStat {
|
||||
// BaseTask corresponds to asynq.Task type.
|
||||
interface BaseTask {
|
||||
type: string;
|
||||
payload: { [key: string]: any };
|
||||
payload: string;
|
||||
}
|
||||
|
||||
export interface ActiveTask extends BaseTask {
|
||||
@@ -314,7 +314,7 @@ export interface SchedulerEntry {
|
||||
id: string;
|
||||
spec: string;
|
||||
task_type: string;
|
||||
task_payload: { [key: string]: any };
|
||||
task_payload: string;
|
||||
options: string[];
|
||||
next_enqueue_at: string;
|
||||
// prev_enqueue_at will be omitted
|
||||
|
@@ -288,7 +288,7 @@ function Row(props: RowProps) {
|
||||
language="json"
|
||||
customStyle={{ margin: 0, maxWidth: 400 }}
|
||||
>
|
||||
{JSON.stringify(task.payload)}
|
||||
{task.payload}
|
||||
</SyntaxHighlighter>
|
||||
</TableCell>
|
||||
<TableCell>{task.canceling ? "Canceling" : "Running"}</TableCell>
|
||||
|
@@ -331,7 +331,7 @@ function Row(props: RowProps) {
|
||||
language="json"
|
||||
customStyle={{ margin: 0, maxWidth: 400 }}
|
||||
>
|
||||
{JSON.stringify(task.payload)}
|
||||
{task.payload}
|
||||
</SyntaxHighlighter>
|
||||
</TableCell>
|
||||
<TableCell>{timeAgo(task.last_failed_at)}</TableCell>
|
||||
|
@@ -333,7 +333,7 @@ function Row(props: RowProps) {
|
||||
language="json"
|
||||
customStyle={{ margin: 0, maxWidth: 400 }}
|
||||
>
|
||||
{JSON.stringify(task.payload)}
|
||||
{task.payload}
|
||||
</SyntaxHighlighter>
|
||||
</TableCell>
|
||||
<TableCell align="right">{task.retried}</TableCell>
|
||||
|
@@ -365,7 +365,7 @@ function Row(props: RowProps) {
|
||||
language="json"
|
||||
customStyle={{ margin: 0, maxWidth: 400 }}
|
||||
>
|
||||
{JSON.stringify(task.payload)}
|
||||
{task.payload}
|
||||
</SyntaxHighlighter>
|
||||
</TableCell>
|
||||
<TableCell>{durationBefore(task.next_process_at)}</TableCell>
|
||||
|
@@ -362,7 +362,7 @@ function Row(props: RowProps) {
|
||||
language="json"
|
||||
customStyle={{ margin: 0, maxWidth: 400 }}
|
||||
>
|
||||
{JSON.stringify(task.payload)}
|
||||
{task.payload}
|
||||
</SyntaxHighlighter>
|
||||
</TableCell>
|
||||
<TableCell>{durationBefore(task.next_process_at)}</TableCell>
|
||||
|
@@ -288,7 +288,7 @@ function Row(props: RowProps) {
|
||||
</TableCell>
|
||||
<TableCell className={clsx(isLastRow && classes.noBorder)}>
|
||||
<SyntaxHighlighter language="json">
|
||||
{JSON.stringify(entry.task_payload)}
|
||||
{entry.task_payload}
|
||||
</SyntaxHighlighter>
|
||||
</TableCell>
|
||||
<TableCell className={clsx(isLastRow && classes.noBorder)}>
|
||||
|
@@ -282,7 +282,7 @@ function Row(props: RowProps) {
|
||||
language="json"
|
||||
customStyle={{ margin: 0 }}
|
||||
>
|
||||
{JSON.stringify(worker.task_payload)}
|
||||
{worker.task_payload}
|
||||
</SyntaxHighlighter>
|
||||
</TableCell>
|
||||
<TableCell>{worker.queue}</TableCell>
|
||||
|
Reference in New Issue
Block a user