Skip to content

Commit

Permalink
feat(core): Create JobBuffer infrastructure
Browse files Browse the repository at this point in the history
Relates to #1137
  • Loading branch information
michaelbromley committed Oct 7, 2021
1 parent 9537245 commit d6aa20f
Show file tree
Hide file tree
Showing 23 changed files with 314 additions and 118 deletions.
39 changes: 21 additions & 18 deletions packages/admin-ui/src/lib/core/src/common/generated-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -647,17 +647,13 @@ export type CreatePaymentMethodInput = {
handler: ConfigurableOperationInput;
};

export type CreateProductCustomFieldsInput = {
coffeeProfileWithMilk?: Maybe<Scalars['String']>;
};

export type CreateProductInput = {
featuredAssetId?: Maybe<Scalars['ID']>;
enabled?: Maybe<Scalars['Boolean']>;
assetIds?: Maybe<Array<Scalars['ID']>>;
facetValueIds?: Maybe<Array<Scalars['ID']>>;
translations: Array<ProductTranslationInput>;
customFields?: Maybe<CreateProductCustomFieldsInput>;
customFields?: Maybe<Scalars['JSON']>;
};

export type CreateProductOptionGroupInput = {
Expand Down Expand Up @@ -1675,6 +1671,12 @@ export type Job = Node & {
attempts: Scalars['Int'];
};

export type JobBufferSize = {
__typename?: 'JobBufferSize';
processorId: Scalars['String'];
size: Scalars['Int'];
};

export type JobFilterParameter = {
createdAt?: Maybe<DateOperators>;
startedAt?: Maybe<DateOperators>;
Expand Down Expand Up @@ -2276,6 +2278,7 @@ export type Mutation = {
deleteTaxRate: DeletionResponse;
/** Delete a Zone */
deleteZone: DeletionResponse;
flushBufferedJobs: Success;
importProducts?: Maybe<ImportInfo>;
/** Authenticates the user using the native authentication strategy. This mutation is an alias for `authenticate({ native: { ... }})` */
login: NativeAuthenticationResult;
Expand Down Expand Up @@ -2679,6 +2682,11 @@ export type MutationDeleteZoneArgs = {
};


export type MutationFlushBufferedJobsArgs = {
processorIds?: Maybe<Array<Scalars['String']>>;
};


export type MutationImportProductsArgs = {
csvFile: Scalars['Upload'];
};
Expand Down Expand Up @@ -3603,19 +3611,14 @@ export type Product = Node & {
facetValues: Array<FacetValue>;
translations: Array<ProductTranslation>;
collections: Array<Collection>;
customFields?: Maybe<ProductCustomFields>;
customFields?: Maybe<Scalars['JSON']>;
};


export type ProductVariantListArgs = {
options?: Maybe<ProductVariantListOptions>;
};

export type ProductCustomFields = {
__typename?: 'ProductCustomFields';
coffeeProfileWithMilk?: Maybe<Scalars['String']>;
};

export type ProductFilterParameter = {
enabled?: Maybe<BooleanOperators>;
createdAt?: Maybe<DateOperators>;
Expand All @@ -3624,7 +3627,6 @@ export type ProductFilterParameter = {
name?: Maybe<StringOperators>;
slug?: Maybe<StringOperators>;
description?: Maybe<StringOperators>;
coffeeProfileWithMilk?: Maybe<StringOperators>;
};

export type ProductList = PaginatedList & {
Expand Down Expand Up @@ -3714,7 +3716,6 @@ export type ProductSortParameter = {
name?: Maybe<SortOrder>;
slug?: Maybe<SortOrder>;
description?: Maybe<SortOrder>;
coffeeProfileWithMilk?: Maybe<SortOrder>;
};

export type ProductTranslation = {
Expand Down Expand Up @@ -3920,6 +3921,7 @@ export type Query = {
fulfillmentHandlers: Array<ConfigurableOperationDefinition>;
globalSettings: GlobalSettings;
job?: Maybe<Job>;
jobBufferSize: Array<JobBufferSize>;
jobQueues: Array<JobQueue>;
jobs: JobList;
jobsById: Array<Job>;
Expand Down Expand Up @@ -4048,6 +4050,11 @@ export type QueryJobArgs = {
};


export type QueryJobBufferSizeArgs = {
processorIds?: Maybe<Array<Scalars['String']>>;
};


export type QueryJobsArgs = {
options?: Maybe<JobListOptions>;
};
Expand Down Expand Up @@ -4941,18 +4948,14 @@ export type UpdatePaymentMethodInput = {
handler?: Maybe<ConfigurableOperationInput>;
};

export type UpdateProductCustomFieldsInput = {
coffeeProfileWithMilk?: Maybe<Scalars['String']>;
};

export type UpdateProductInput = {
id: Scalars['ID'];
enabled?: Maybe<Scalars['Boolean']>;
featuredAssetId?: Maybe<Scalars['ID']>;
assetIds?: Maybe<Array<Scalars['ID']>>;
facetValueIds?: Maybe<Array<Scalars['ID']>>;
translations?: Maybe<Array<ProductTranslationInput>>;
customFields?: Maybe<UpdateProductCustomFieldsInput>;
customFields?: Maybe<Scalars['JSON']>;
};

export type UpdateProductOptionGroupInput = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -632,17 +632,13 @@ export type CreatePaymentMethodInput = {
handler: ConfigurableOperationInput;
};

export type CreateProductCustomFieldsInput = {
coffeeProfileWithMilk?: Maybe<Scalars['String']>;
};

export type CreateProductInput = {
featuredAssetId?: Maybe<Scalars['ID']>;
enabled?: Maybe<Scalars['Boolean']>;
assetIds?: Maybe<Array<Scalars['ID']>>;
facetValueIds?: Maybe<Array<Scalars['ID']>>;
translations: Array<ProductTranslationInput>;
customFields?: Maybe<CreateProductCustomFieldsInput>;
customFields?: Maybe<Scalars['JSON']>;
};

export type CreateProductOptionGroupInput = {
Expand Down Expand Up @@ -1624,6 +1620,11 @@ export type Job = Node & {
attempts: Scalars['Int'];
};

export type JobBufferSize = {
processorId: Scalars['String'];
size: Scalars['Int'];
};

export type JobFilterParameter = {
createdAt?: Maybe<DateOperators>;
startedAt?: Maybe<DateOperators>;
Expand Down Expand Up @@ -2194,6 +2195,7 @@ export type Mutation = {
/** Remove all settled jobs in the given queues olfer than the given date. Returns the number of jobs deleted. */
removeSettledJobs: Scalars['Int'];
cancelJob: Job;
flushBufferedJobs: Success;
settlePayment: SettlePaymentResult;
addFulfillmentToOrder: AddFulfillmentToOrderResult;
cancelOrder: CancelOrderResult;
Expand Down Expand Up @@ -2501,6 +2503,10 @@ export type MutationCancelJobArgs = {
jobId: Scalars['ID'];
};

export type MutationFlushBufferedJobsArgs = {
processorIds?: Maybe<Array<Scalars['String']>>;
};

export type MutationSettlePaymentArgs = {
id: Scalars['ID'];
};
Expand Down Expand Up @@ -3375,17 +3381,13 @@ export type Product = Node & {
facetValues: Array<FacetValue>;
translations: Array<ProductTranslation>;
collections: Array<Collection>;
customFields?: Maybe<ProductCustomFields>;
customFields?: Maybe<Scalars['JSON']>;
};

export type ProductVariantListArgs = {
options?: Maybe<ProductVariantListOptions>;
};

export type ProductCustomFields = {
coffeeProfileWithMilk?: Maybe<Scalars['String']>;
};

export type ProductFilterParameter = {
enabled?: Maybe<BooleanOperators>;
createdAt?: Maybe<DateOperators>;
Expand All @@ -3394,7 +3396,6 @@ export type ProductFilterParameter = {
name?: Maybe<StringOperators>;
slug?: Maybe<StringOperators>;
description?: Maybe<StringOperators>;
coffeeProfileWithMilk?: Maybe<StringOperators>;
};

export type ProductList = PaginatedList & {
Expand Down Expand Up @@ -3478,7 +3479,6 @@ export type ProductSortParameter = {
name?: Maybe<SortOrder>;
slug?: Maybe<SortOrder>;
description?: Maybe<SortOrder>;
coffeeProfileWithMilk?: Maybe<SortOrder>;
};

export type ProductTranslation = {
Expand Down Expand Up @@ -3678,6 +3678,7 @@ export type Query = {
jobs: JobList;
jobsById: Array<Job>;
jobQueues: Array<JobQueue>;
jobBufferSize: Array<JobBufferSize>;
order?: Maybe<Order>;
orders: OrderList;
paymentMethods: PaymentMethodList;
Expand Down Expand Up @@ -3791,6 +3792,10 @@ export type QueryJobsByIdArgs = {
jobIds: Array<Scalars['ID']>;
};

export type QueryJobBufferSizeArgs = {
processorIds?: Maybe<Array<Scalars['String']>>;
};

export type QueryOrderArgs = {
id: Scalars['ID'];
};
Expand Down Expand Up @@ -4623,18 +4628,14 @@ export type UpdatePaymentMethodInput = {
handler?: Maybe<ConfigurableOperationInput>;
};

export type UpdateProductCustomFieldsInput = {
coffeeProfileWithMilk?: Maybe<Scalars['String']>;
};

export type UpdateProductInput = {
id: Scalars['ID'];
enabled?: Maybe<Scalars['Boolean']>;
featuredAssetId?: Maybe<Scalars['ID']>;
assetIds?: Maybe<Array<Scalars['ID']>>;
facetValueIds?: Maybe<Array<Scalars['ID']>>;
translations?: Maybe<Array<ProductTranslationInput>>;
customFields?: Maybe<UpdateProductCustomFieldsInput>;
customFields?: Maybe<Scalars['JSON']>;
};

export type UpdateProductOptionGroupInput = {
Expand Down
9 changes: 1 addition & 8 deletions packages/common/src/generated-shop-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2317,26 +2317,20 @@ export type Product = Node & {
facetValues: Array<FacetValue>;
translations: Array<ProductTranslation>;
collections: Array<Collection>;
customFields?: Maybe<ProductCustomFields>;
customFields?: Maybe<Scalars['JSON']>;
};

export type ProductVariantListArgs = {
options?: Maybe<ProductVariantListOptions>;
};

export type ProductCustomFields = {
__typename?: 'ProductCustomFields';
coffeeProfileWithMilk?: Maybe<Scalars['String']>;
};

export type ProductFilterParameter = {
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
languageCode?: Maybe<StringOperators>;
name?: Maybe<StringOperators>;
slug?: Maybe<StringOperators>;
description?: Maybe<StringOperators>;
coffeeProfileWithMilk?: Maybe<StringOperators>;
};

export type ProductList = PaginatedList & {
Expand Down Expand Up @@ -2404,7 +2398,6 @@ export type ProductSortParameter = {
name?: Maybe<SortOrder>;
slug?: Maybe<SortOrder>;
description?: Maybe<SortOrder>;
coffeeProfileWithMilk?: Maybe<SortOrder>;
};

export type ProductTranslation = {
Expand Down
Loading

0 comments on commit d6aa20f

Please sign in to comment.