@@ -112,7 +112,7 @@ export interface FileViewedStateChangeEvent {
112112
113113export type FileViewedState = { [ key : string ] : ViewedState } ;
114114
115- const BATCH_SIZE = 100 ;
115+ const BATCH_SIZE = 50 ;
116116
117117export class PullRequestModel extends IssueModel < PullRequest > implements IPullRequestModel {
118118 static override ID = 'PullRequestModel' ;
@@ -2025,18 +2025,22 @@ export class PullRequestModel extends IssueModel<PullRequest> implements IPullRe
20252025 // We only ever send 100 mutations at once. Any more than this and
20262026 // we risk a timeout from GitHub.
20272027 for ( let i = 0 ; i < allFilenames . length ; i += BATCH_SIZE ) {
2028- const batch = allFilenames . slice ( i , i + BATCH_SIZE ) ;
2029- // See below for an example of what a mutation produced by this
2030- // will look like
2031- const mutation = gql `mutation Batch${ mutationName } {
2032- ${ batch . map ( ( filename , i ) =>
2033- `alias${ i } : ${ mutationName } (
2034- input: {path: "${ filename } ", pullRequestId: "${ pullRequestId } "}
2035- ) { clientMutationId }
2036- `
2037- ) }
2038- }` ;
2039- await mutate < void > ( { mutation } ) ;
2028+ try {
2029+ const batch = allFilenames . slice ( i , i + BATCH_SIZE ) ;
2030+ // See below for an example of what a mutation produced by this
2031+ // will look like
2032+ const mutation = gql `mutation Batch${ mutationName } {
2033+ ${ batch . map ( ( filename , i ) =>
2034+ `alias${ i } : ${ mutationName } (
2035+ input: {path: "${ filename } ", pullRequestId: "${ pullRequestId } "}
2036+ ) { clientMutationId }
2037+ `
2038+ ) }
2039+ }` ;
2040+ await mutate < void > ( { mutation } ) ;
2041+ } catch ( e ) {
2042+ Logger . error ( `Error marking files as ${ state } : ${ e } ` , PullRequestModel . ID ) ;
2043+ }
20402044 }
20412045
20422046 // mutation BatchUnmarkFileAsViewedInline {
0 commit comments