self.addEventListener('sync', event => {
    if (event.tag === 'asolar-sync') {
        event.waitUntil(
            self.clients.matchAll().then(clients => {
                clients.forEach(client => {
                    client.postMessage({ action: "sync_queue" });
                });
            })
        );
    }
});
