Exemplo n.º 1
0
def refresh_all():
    """Reload watchlists for all wikis where a watchlist is already present."""
    cache_path = CachedRequest._get_cache_dir()
    files = os.scandir(cache_path)
    seen = set()
    for filename in files:
        entry = CacheEntry(cache_path, filename)
        entry._load_cache()
        entry.parse_key()
        entry._rebuild()
        if entry.site not in seen and 'watchlistraw' in entry._data:
            refresh(entry.site)
            seen.add(entry.site)
Exemplo n.º 2
0
def refresh_all(sysop=False):
    """Reload watchlists for all wikis where a watchlist is already present."""
    cache_path = CachedRequest._get_cache_dir()
    files = os.listdir(cache_path)
    seen = []
    for filename in files:
        entry = CacheEntry(cache_path, filename)
        entry._load_cache()
        entry.parse_key()
        entry._rebuild()
        if entry.site not in seen:
            if entry._data['watchlistraw']:
                refresh(entry.site)
                seen.append(entry.site)
Exemplo n.º 3
0
def refresh_all(sysop=False):
    """Reload watchlists for all wikis where a watchlist is already present."""
    cache_path = CachedRequest._get_cache_dir()
    files = os.listdir(cache_path)
    seen = []
    for filename in files:
        entry = CacheEntry(cache_path, filename)
        entry._load_cache()
        entry.parse_key()
        entry._rebuild()
        if entry.site not in seen:
            if entry._data.get('watchlistraw'):
                refresh(entry.site, sysop)
                seen.append(entry.site)