feat(medusa): Add batch strategy for order exports (#1603)

This commit is contained in:
Philip Korsholm
2022-06-29 09:54:37 +02:00
committed by GitHub
parent c0f624ad3b
commit bf47d1aecd
18 changed files with 1156 additions and 115 deletions
+15 -4
View File
@@ -1,5 +1,16 @@
import { AfterLoad, BeforeInsert, Column, Entity, JoinColumn, ManyToOne } from "typeorm"
import { BatchJobResultError, BatchJobResultStatDescriptor, BatchJobStatus } from "../types/batch-job"
import {
AfterLoad,
BeforeInsert,
Column,
Entity,
JoinColumn,
ManyToOne,
} from "typeorm"
import {
BatchJobResultError,
BatchJobResultStatDescriptor,
BatchJobStatus,
} from "../types/batch-job"
import { DbAwareColumn, resolveDbType } from "../utils/db-aware-column"
import { SoftDeletableEntity } from "../interfaces/models/soft-deletable-entity"
import { generateEntityId } from "../utils/generate-entity-id"
@@ -33,7 +44,7 @@ export class BatchJob extends SoftDeletableEntity {
} & Record<string, unknown>
@Column({ type: "boolean", nullable: false, default: false })
dry_run: boolean = false;
dry_run = false
@Column({ type: resolveDbType("timestamptz"), nullable: true })
pre_processed_at?: Date
@@ -141,7 +152,7 @@ export class BatchJob extends SoftDeletableEntity {
* description: "The date of the completion."
* type: string
* format: date-time
* canceled_at:
* canceled_at:
* description: "The date of the concellation."
* type: string
* format: date-time