perf: Remove saving Parse Cloud Job request parameters in internal collection _JobStatus (#8343)
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user