Skip to content

Commit 8562e3a

Browse files
authored
Reduce concurrency in dartdoc job execution (#1391)
1 parent 070d622 commit 8562e3a

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

app/bin/service/dartdoc.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ void _workerMain(WorkerEntryMessage message) {
7676
message.statsSendPort.send(await jobBackend.stats(JobService.dartdoc));
7777
});
7878

79-
await jobMaintenance.run(taskReceivePort, concurrency: 2);
79+
await jobMaintenance.run(taskReceivePort);
8080
});
8181
}
8282

app/lib/job/job.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,14 @@ class JobMaintenance {
7878
final JobProcessor _processor;
7979
JobMaintenance(this._db, this._processor);
8080

81-
Future run(Stream taskStream, {int concurrency: 1}) {
81+
Future run(Stream taskStream) {
8282
final futures = <Future>[
8383
syncNotifications(taskStream),
8484
syncDatastoreHead(),
8585
syncDatastoreHistory(),
8686
updateStates(),
87+
_processor.run(),
8788
];
88-
for (int i = 0; i < concurrency; i++) {
89-
futures.add(_processor.run());
90-
}
9189
return Future.wait(futures);
9290
}
9391

0 commit comments

Comments
 (0)