perf: Remove saving Parse Cloud Job request parameters in internal collection _JobStatus (#8343)

This commit is contained in:
Thomas Foricher
2025-05-14 21:24:56 +02:00
committed by GitHub
parent 084ac5b90d
commit e98733cbac
2 changed files with 2 additions and 3 deletions

View File

@@ -76,7 +76,7 @@ export class FunctionsRouter extends PromiseRouter {
message: jobHandler.setMessage.bind(jobHandler),
};
return jobHandler.setRunning(jobName, params).then(jobStatus => {
return jobHandler.setRunning(jobName).then(jobStatus => {
request.jobId = jobStatus.objectId;
// run the function async
process.nextTick(() => {

View File

@@ -77,12 +77,11 @@ export function jobStatusHandler(config) {
const objectId = newObjectId(config.objectIdSize);
const database = config.database;
const handler = statusHandler(JOB_STATUS_COLLECTION, database);
const setRunning = function (jobName, params) {
const setRunning = function (jobName) {
const now = new Date();
jobStatus = {
objectId,
jobName,
params,
status: 'running',
source: 'api',
createdAt: now,