@@ -90,16 +90,15 @@ class PingUploader implements PingsDatabaseObserver {
9090 constructor (
9191 config : Configuration ,
9292 platform : Platform ,
93- private readonly pingsDatabase : PingsDatabase ,
94- private readonly policy = new Policy
93+ private readonly pingsDatabase = Context . pingsDatabase ,
94+ private readonly policy = new Policy ( )
9595 ) {
9696 this . processing = [ ] ;
9797 // Initialize the ping uploader with either the platform defaults or a custom
9898 // provided uploader from the configuration object.
9999 this . uploader = config . httpClient ? config . httpClient : platform . uploader ;
100100 this . platformInfo = platform . info ;
101101 this . serverEndpoint = config . serverEndpoint ;
102- this . pingsDatabase = pingsDatabase ;
103102
104103 // Initialize the dispatcher immediatelly.
105104 this . dispatcher = createAndInitializeDispatcher ( ) ;
@@ -124,6 +123,7 @@ class PingUploader implements PingsDatabaseObserver {
124123
125124 // If the ping is a deletion-request ping, we want to enqueue it as a persistent task,
126125 // so that clearing the queue does not clear it.
126+ //
127127 // eslint-disable-next-line @typescript-eslint/unbound-method
128128 const launchFn = isDeletionRequest ( ping ) ? this . dispatcher . launchPersistent : this . dispatcher . launch ;
129129
@@ -298,7 +298,6 @@ class PingUploader implements PingsDatabaseObserver {
298298 if ( status && status >= 200 && status < 300 ) {
299299 log ( LOG_TAG , `Ping ${ identifier } succesfully sent ${ status } .` , LoggingLevel . Info ) ;
300300 await this . pingsDatabase . deletePing ( identifier ) ;
301- this . processing ;
302301 return false ;
303302 }
304303
0 commit comments