MCPcopy
hub / github.com/browserless/browserless / handleSuccess

Method handleSuccess

src/limiter.ts:94–107  ·  view source on GitHub ↗
({ detail: { job } }: { detail: { job: Job } })

Source from the content-addressed store, hash-verified

92 }
93
94 protected handleSuccess({ detail: { job } }: { detail: { job: Job } }) {
95 const timeUsed = Date.now() - job.start;
96 this.logger.debug(
97 `Job has succeeded after ${timeUsed.toLocaleString()}ms of activity.`,
98 );
99 this.metrics.addSuccessful(Date.now() - job.start);
100 // @TODO Figure out a better argument handling for jobs
101 this.jobEnd({
102 req: job.args[0],
103 start: job.start,
104 status: 'successful',
105 route: job.route,
106 } as AfterResponse);
107 }
108
109 protected handleJobTimeout({
110 detail: { next, job },

Callers

nothing calls this directly

Calls 3

jobEndMethod · 0.95
debugMethod · 0.80
addSuccessfulMethod · 0.80

Tested by

no test coverage detected