Skip to content

Commit

Permalink
Remove references to cron
Browse files Browse the repository at this point in the history
  • Loading branch information
adhityamamallan committed Jan 6, 2025
1 parent 001002d commit a180073
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,11 @@ import { type SortOrder } from '@/utils/sort-by';
import { WORKFLOW_STATUSES } from '@/views/shared/workflow-status-tag/workflow-status-tag.constants';
import type { WorkflowStatus } from '@/views/shared/workflow-status-tag/workflow-status-tag.types';

import {
type ListWorkflowsCronValue,
type TimeColumn,
} from '../list-workflows.types';
import { type TimeColumn } from '../list-workflows.types';

export default function getListWorkflowExecutionsQuery({
search,
workflowStatus,
cron,
sortColumn,
sortOrder,
timeColumn,
Expand All @@ -19,7 +15,6 @@ export default function getListWorkflowExecutionsQuery({
}: {
search?: string;
workflowStatus?: WorkflowStatus;
cron?: ListWorkflowsCronValue;
sortColumn?: string;
sortOrder?: SortOrder;
timeColumn: TimeColumn;
Expand All @@ -45,10 +40,6 @@ export default function getListWorkflowExecutionsQuery({
}
}

if (cron) {
searchQueries.push(`IsCron = "${cron === 'CRON'}"`);
}

if (timeRangeStart) {
searchQueries.push(`${timeColumn} > "${timeRangeStart}"`);
}
Expand Down
1 change: 0 additions & 1 deletion src/route-handlers/list-workflows/list-workflows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ export async function listWorkflows(
: getListWorkflowExecutionsQuery({
search: queryParams.search,
workflowStatus: queryParams.status,
cron: queryParams.cron,
sortColumn: queryParams.sortColumn,
sortOrder: queryParams.sortOrder,
timeColumn: queryParams.timeColumn,
Expand Down
5 changes: 0 additions & 5 deletions src/route-handlers/list-workflows/list-workflows.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ export type ListWorkflowsRequestQueryParams = z.input<
typeof listWorkflowsQueryParamSchema
>;

export type ListWorkflowsCronValue = Exclude<
ListWorkflowsRequestQueryParams['cron'],
undefined
>;

export type TimeColumn = ListWorkflowsRequestQueryParams['timeColumn'];

export type ListWorkflowsResponse = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ const listWorkflowsQueryParamSchema = z
message: 'Invalid workflow status',
})
.optional(),
cron: z.enum(['CRON', 'NON_CRON']).optional(),
timeColumn: z
.enum(['StartTime', 'CloseTime'])
.optional()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ function generateWorkflowPages(count: number): Array<ListWorkflowsResponse> {
status: 'WORKFLOW_EXECUTION_CLOSE_STATUS_COMPLETED',
startTime: 1684800000000,
closeTime: count > 5 ? 1684886400000 : undefined,
isCron: false,
})),
nextPage: `${pageIndex + 1}`,
})
Expand Down

0 comments on commit a180073

Please sign in to comment.