@@ -41,7 +41,6 @@ pub struct CdnInvalidation {
41
41
pub ( crate ) completed : bool ,
42
42
}
43
43
44
- #[ derive( Debug ) ]
45
44
pub enum CdnBackend {
46
45
Dummy {
47
46
invalidation_requests : Arc < Mutex < Vec < CdnInvalidation > > > ,
@@ -81,7 +80,7 @@ impl CdnBackend {
81
80
///
82
81
/// Returns the caller reference that can be used to query the status of this
83
82
/// invalidation request.
84
- #[ instrument]
83
+ #[ instrument( skip ( self ) ) ]
85
84
async fn create_invalidation (
86
85
& self ,
87
86
distribution_id : & str ,
@@ -299,9 +298,8 @@ impl CdnBackend {
299
298
}
300
299
301
300
/// fully invalidate the CDN distribution, also emptying the queue.
302
- #[ instrument( skip ( conn ) ) ]
301
+ #[ instrument( skip_all , fields ( distribution_id ) ) ]
303
302
pub ( crate ) async fn full_invalidation (
304
- config : & Config ,
305
303
cdn : & CdnBackend ,
306
304
metrics : & InstanceMetrics ,
307
305
conn : & mut sqlx:: PgConnection ,
@@ -356,7 +354,7 @@ pub(crate) async fn full_invalidation(
356
354
Ok ( ( ) )
357
355
}
358
356
359
- #[ instrument( skip ( conn ) ) ]
357
+ #[ instrument( skip_all , fields ( distribution_id ) ) ]
360
358
pub ( crate ) async fn handle_queued_invalidation_requests (
361
359
config : & Config ,
362
360
cdn : & CdnBackend ,
@@ -457,7 +455,7 @@ pub(crate) async fn handle_queued_invalidation_requests(
457
455
. await ?
458
456
{
459
457
if ( now - min_queued) . to_std ( ) . unwrap_or_default ( ) >= config. cdn_max_queued_age {
460
- full_invalidation ( config , cdn, metrics, conn, distribution_id) . await ?;
458
+ full_invalidation ( cdn, metrics, conn, distribution_id) . await ?;
461
459
return Ok ( ( ) ) ;
462
460
}
463
461
}
0 commit comments