File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import 'package:gcloud/db.dart';
10
10
import 'package:gcloud/storage.dart' ;
11
11
import 'package:logging/logging.dart' ;
12
12
13
+ import 'package:pub_dartlang_org/analyzer/backend.dart' ;
13
14
import 'package:pub_dartlang_org/history/backend.dart' ;
14
15
import 'package:pub_dartlang_org/job/backend.dart' ;
15
16
import 'package:pub_dartlang_org/job/job.dart' ;
@@ -95,6 +96,7 @@ void _workerMain(WorkerEntryMessage message) {
95
96
Future _registerServices () async {
96
97
registerDartdocMemcache (new DartdocMemcache (memcacheService));
97
98
99
+ registerAnalysisBackend (new AnalysisBackend (dbService));
98
100
final Bucket storageBucket = await getOrCreateBucket (
99
101
storageService, activeConfiguration.dartdocStorageBucketName);
100
102
registerDartdocBackend (new DartdocBackend (dbService, storageBucket));
Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ import 'package:pana/src/utils.dart' show runProc;
12
12
import 'package:path/path.dart' as p;
13
13
import 'package:uuid/uuid.dart' ;
14
14
15
+ import '../analyzer/backend.dart' ;
16
+ import '../job/backend.dart' ;
15
17
import '../job/job.dart' ;
16
18
import '../shared/configuration.dart' show envConfig;
17
19
import '../shared/urls.dart' ;
@@ -118,6 +120,21 @@ class DartdocJobProcessor extends JobProcessor {
118
120
119
121
await dartdocBackend.removeObsolete (job.packageName, job.packageVersion);
120
122
123
+ // Trigger analyzer job to pick up the new dartdoc results.
124
+ final pkgStatus = await analysisBackend.getPackageStatus (
125
+ job.packageName, job.packageVersion);
126
+ if (pkgStatus.exists &&
127
+ ! pkgStatus.isDiscontinued &&
128
+ ! pkgStatus.isObsolete) {
129
+ await jobBackend.createOrUpdate (
130
+ JobService .analyzer,
131
+ job.packageName,
132
+ job.packageVersion,
133
+ job.isLatestStable,
134
+ job.packageVersionUpdated,
135
+ true );
136
+ }
137
+
121
138
return hasContent ? JobStatus .success : JobStatus .failed;
122
139
}
123
140
You can’t perform that action at this time.
0 commit comments