feat: find missing jobs fix
This commit is contained in:
parent
e09187db50
commit
27f1db769a
|
|
@ -48,6 +48,11 @@ export class PostsRepository {
|
|||
searchForMissingThreeHoursPosts() {
|
||||
return this._post.model.post.findMany({
|
||||
where: {
|
||||
integration: {
|
||||
refreshNeeded: false,
|
||||
inBetweenSteps: false,
|
||||
disabled: false,
|
||||
},
|
||||
publishDate: {
|
||||
gte: dayjs.utc().toDate(),
|
||||
lt: dayjs.utc().add(3, 'hour').toDate(),
|
||||
|
|
@ -66,6 +71,11 @@ export class PostsRepository {
|
|||
getOldPosts(orgId: string, date: string) {
|
||||
return this._post.model.post.findMany({
|
||||
where: {
|
||||
integration: {
|
||||
refreshNeeded: false,
|
||||
inBetweenSteps: false,
|
||||
disabled: false,
|
||||
},
|
||||
organizationId: orgId,
|
||||
publishDate: {
|
||||
lte: dayjs(date).toDate(),
|
||||
|
|
|
|||
|
|
@ -338,9 +338,14 @@ model Integration {
|
|||
@@unique([organizationId, internalId])
|
||||
@@index([rootInternalId])
|
||||
@@index([organizationId])
|
||||
@@index([providerIdentifier])
|
||||
@@index([updatedAt])
|
||||
@@index([createdAt])
|
||||
@@index([deletedAt])
|
||||
@@index([customerId])
|
||||
@@index([inBetweenSteps])
|
||||
@@index([refreshNeeded])
|
||||
@@index([disabled])
|
||||
}
|
||||
|
||||
model Signatures {
|
||||
|
|
|
|||
Loading…
Reference in New Issue