overleaf/services/web/app/src/models/ProjectHistoryFailure.js
Eric Mc Sween 65976cb363 Merge pull request #11869 from overleaf/em-upgrade-mongoose-web
Upgrade Mongoose and the Mongo driver in web

GitOrigin-RevId: 2cad1aabe57eae424a9e4c68b2e0062f0e78ffaf
2023-03-01 09:03:27 +00:00

24 lines
562 B
JavaScript

const mongoose = require('../infrastructure/Mongoose')
const { Schema } = mongoose
const ProjectHistoryFailureSchema = new Schema(
{
project_id: Schema.Types.ObjectId,
ts: Date,
queueSize: Number,
error: String,
stack: String,
attempts: Number,
history: Schema.Types.Mixed,
resyncStartedAt: Date,
resyncAttempts: Number,
requestCount: Number,
},
{ collection: 'projectHistoryFailures', minimize: false }
)
exports.ProjectHistoryFailure = mongoose.model(
'ProjectHistoryFailure',
ProjectHistoryFailureSchema
)