mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 14:43:46 +01:00
[history-v1] use POST requests for expiring redis buffer from cron (#26568)
* [history-v1] use POST requests for expiring redis buffer from cron (cherry picked from commit 15780ac54e36b96e1aed9fd9eb6dfe9d4fbf842f) * [history-v1] remove double claim of expire job GitOrigin-RevId: 8b2eab07006a5819a47eed3f646b2a4d75f86e5b
This commit is contained in:
@@ -28,6 +28,7 @@ const InvalidChangeError = storage.InvalidChangeError
|
||||
|
||||
const render = require('./render')
|
||||
const Rollout = require('../app/rollout')
|
||||
const redisBackend = require('../../storage/lib/chunk_store/redis')
|
||||
|
||||
const rollout = new Rollout(config)
|
||||
rollout.report(logger) // display the rollout configuration in the logs
|
||||
@@ -177,6 +178,13 @@ async function flushChanges(req, res, next) {
|
||||
}
|
||||
}
|
||||
|
||||
async function expireProject(req, res, next) {
|
||||
const projectId = req.swagger.params.project_id.value
|
||||
await redisBackend.expireProject(projectId)
|
||||
res.status(HTTPStatus.OK).end()
|
||||
}
|
||||
|
||||
exports.importSnapshot = expressify(importSnapshot)
|
||||
exports.importChanges = expressify(importChanges)
|
||||
exports.flushChanges = expressify(flushChanges)
|
||||
exports.expireProject = expressify(expireProject)
|
||||
|
||||
Reference in New Issue
Block a user