@@ -54,9 +54,6 @@ type osvOptions struct {
5454 interval time.Duration
5555 // enable/disable message publish to queue
5656 publishToQueue bool
57- // days since the last vulnerability scan was run.
58- // 0 means only run once
59- daysSinceLastScan int
6057 // sets artificial latency on the certifier (default to nil)
6158 addedLatency * time.Duration
6259 // sets the batch size for pagination query for the certifier
@@ -90,7 +87,6 @@ you have access to read and write to the respective blob store.`,
9087 viper .GetString ("interval" ),
9188 viper .GetBool ("service-poll" ),
9289 viper .GetBool ("publish-to-queue" ),
93- viper .GetInt ("last-scan" ),
9490 viper .GetString ("certifier-latency" ),
9591 viper .GetInt ("certifier-batch-size" ),
9692 )
@@ -111,7 +107,7 @@ you have access to read and write to the respective blob store.`,
111107 httpClient := http.Client {Transport : transport }
112108 gqlclient := graphql .NewClient (opts .graphqlEndpoint , & httpClient )
113109
114- packageQueryFunc , err := getPackageQuery (gqlclient , opts .daysSinceLastScan , opts . batchSize , opts .addedLatency )
110+ packageQueryFunc , err := getPackageQuery (gqlclient , opts .batchSize , opts .addedLatency )
115111 if err != nil {
116112 logger .Errorf ("error: %v" , err )
117113 os .Exit (1 )
@@ -129,7 +125,6 @@ func validateOSVFlags(
129125 interval string ,
130126 poll bool ,
131127 pubToQueue bool ,
132- daysSince int ,
133128 certifierLatencyStr string ,
134129 batchSize int ) (osvOptions , error ) {
135130
@@ -147,7 +142,6 @@ func validateOSVFlags(
147142 return opts , fmt .Errorf ("failed to parser duration with error: %w" , err )
148143 }
149144 opts .interval = i
150- opts .daysSinceLastScan = daysSince
151145
152146 if certifierLatencyStr != "" {
153147 addedLatency , err := time .ParseDuration (certifierLatencyStr )
@@ -170,9 +164,9 @@ func getCertifierPublish(ctx context.Context, blobStore *blob.BlobStore, pubsub
170164 }, nil
171165}
172166
173- func getPackageQuery (client graphql.Client , daysSinceLastScan int , batchSize int , addedLatency * time.Duration ) (func () certifier.QueryComponents , error ) {
167+ func getPackageQuery (client graphql.Client , batchSize int , addedLatency * time.Duration ) (func () certifier.QueryComponents , error ) {
174168 return func () certifier.QueryComponents {
175- packageQuery := root_package .NewPackageQuery (client , daysSinceLastScan , batchSize , addedLatency )
169+ packageQuery := root_package .NewPackageQuery (client , batchSize , addedLatency )
176170 return packageQuery
177171 }, nil
178172}
@@ -255,7 +249,7 @@ func initializeNATsandCertifier(ctx context.Context, blobAddr, pubsubAddr string
255249
256250func init () {
257251 set , err := cli .BuildFlags ([]string {"interval" ,
258- "last-scan" , " header-file" , "certifier-latency" ,
252+ "header-file" , "certifier-latency" ,
259253 "certifier-batch-size" })
260254 if err != nil {
261255 fmt .Fprintf (os .Stderr , "failed to setup flag: %v" , err )
0 commit comments