MCPcopy Create free account
hub / github.com/omkarcloud/botasaurus / end

Method end

js/botasaurus-server-js/src/ndjson.ts:43–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

41 }
42
43 end(): Promise<void> {
44 if (!this.writeStream){
45 return Promise.resolve()
46 }
47 return new Promise(async (resolve) => {
48 await this.preEnd()
49 this.writeStream.end(() => {
50 resolve(); // Resolve when the stream is finished
51 // @ts-ignore
52 this.writeStream = null
53 });
54 });
55 }
56
57 async preEnd() {
58 // Add any necessary pre-end logic here

Callers 14

streamTaskToTaskMethod · 0.95
writeDeduplicatedTasksFunction · 0.95
writeNdJsonFunction · 0.95
appendNdJsonFunction · 0.95
writeJsonStreamedFunction · 0.45
writeJsonFunction · 0.45
writeCsvStreamedFunction · 0.45
writeCsvFunction · 0.45
closeMethod · 0.45
writeJsonStreamedFunction · 0.45
writeJsonFunction · 0.45
writeCsvStreamedFunction · 0.45

Calls 1

preEndMethod · 0.95

Tested by

no test coverage detected