We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b84a32 commit bca27b2Copy full SHA for bca27b2
src/resource_clients/actor.ts
@@ -155,15 +155,13 @@ export class ActorClient extends ResourceClient {
155
const newRunClient = this.apifyClient.run(id);
156
157
const streamedLog = await newRunClient.getStreamedLog({ toLog: options?.log });
158
- let actorRun: Promise<ActorRun> | undefined;
159
- try {
160
- streamedLog?.start();
161
- actorRun = this.apifyClient.run(id).waitForFinish({ waitSecs });
162
- return actorRun;
163
- } finally {
164
- await actorRun;
165
- await streamedLog?.stop();
166
- }
+ streamedLog?.start();
+ return this.apifyClient
+ .run(id)
+ .waitForFinish({ waitSecs })
+ .finally(async () => {
+ await streamedLog?.stop();
+ });
167
}
168
169
/**
0 commit comments