File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
libraries/nestjs-libraries/src/database/prisma Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,11 @@ export class PostsRepository {
4848 searchForMissingThreeHoursPosts ( ) {
4949 return this . _post . model . post . findMany ( {
5050 where : {
51+ integration : {
52+ refreshNeeded : false ,
53+ inBetweenSteps : false ,
54+ disabled : false ,
55+ } ,
5156 publishDate : {
5257 gte : dayjs . utc ( ) . toDate ( ) ,
5358 lt : dayjs . utc ( ) . add ( 3 , 'hour' ) . toDate ( ) ,
@@ -66,6 +71,11 @@ export class PostsRepository {
6671 getOldPosts ( orgId : string , date : string ) {
6772 return this . _post . model . post . findMany ( {
6873 where : {
74+ integration : {
75+ refreshNeeded : false ,
76+ inBetweenSteps : false ,
77+ disabled : false ,
78+ } ,
6979 organizationId : orgId ,
7080 publishDate : {
7181 lte : dayjs ( date ) . toDate ( ) ,
Original file line number Diff line number Diff line change @@ -338,9 +338,14 @@ model Integration {
338338 @@unique ([organizationId , internalId ] )
339339 @@index ([rootInternalId ] )
340340 @@index ([organizationId ] )
341+ @@index ([providerIdentifier ] )
341342 @@index ([updatedAt ] )
343+ @@index ([createdAt ] )
342344 @@index ([deletedAt ] )
343345 @@index ([customerId ] )
346+ @@index ([inBetweenSteps ] )
347+ @@index ([refreshNeeded ] )
348+ @@index ([disabled ] )
344349}
345350
346351model Signatures {
You can’t perform that action at this time.
0 commit comments