File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,10 @@ pub struct Opts {
2424 #[ arg( long) ]
2525 /// Offset to start enqueueing from (useful for resuming)
2626 offset : Option < i64 > ,
27+
28+ #[ arg( long) ]
29+ /// Skip CDN cache invalidation when generating OG images
30+ skip_invalidation : bool ,
2731}
2832
2933pub async fn run ( opts : Opts ) -> Result < ( ) > {
@@ -79,7 +83,13 @@ pub async fn run(opts: Opts) -> Result<()> {
7983 // Create batch of jobs
8084 let jobs = crate_names
8185 . into_iter ( )
82- . map ( GenerateOgImage :: without_cdn_invalidation)
86+ . map ( |crate_name| {
87+ if opts. skip_invalidation {
88+ GenerateOgImage :: without_cdn_invalidation ( crate_name)
89+ } else {
90+ GenerateOgImage :: new ( crate_name)
91+ }
92+ } )
8393 . map ( |job| {
8494 Ok ( (
8595 background_jobs:: job_type. eq ( GenerateOgImage :: JOB_NAME ) ,
You can’t perform that action at this time.
0 commit comments