UniNews
University news from Greek and international universities in one place
Loading...
Searching...
No Matches
uninews.ui.fetch_worker.FetchWorker Class Reference
Inheritance diagram for uninews.ui.fetch_worker.FetchWorker:

Public Member Functions

 __init__ (self, list[Fetcher] fetchers, parent=None)
 
None stop (self)
 
None run (self)
 
list[FetchResult] fetch_group (self, list[Fetcher] fetchers)
 
FetchResult fetch_one (self, Fetcher fetcher)
 

Public Attributes

 fetchers
 
 fetch_group
 
 results
 

Static Public Attributes

 progress = pyqtSignal(int, int, str)
 
 finished_fetching = pyqtSignal(list)
 

Protected Attributes

 _stop
 

Detailed Description

Fetches every fetcher, then emits finished_fetching(results).

Different sites are fetched in parallel, but one site is never asked for
two pages at once, so we stay polite to servers like uom.gr.

Constructor & Destructor Documentation

◆ __init__()

uninews.ui.fetch_worker.FetchWorker.__init__ (   self,
list[Fetcher]  fetchers,
  parent = None 
)

Member Function Documentation

◆ fetch_group()

list[FetchResult] uninews.ui.fetch_worker.FetchWorker.fetch_group (   self,
list[Fetcher]  fetchers 
)
One site's fetchers, one after another.

◆ fetch_one()

FetchResult uninews.ui.fetch_worker.FetchWorker.fetch_one (   self,
Fetcher  fetcher 
)

◆ run()

None uninews.ui.fetch_worker.FetchWorker.run (   self)

◆ stop()

None uninews.ui.fetch_worker.FetchWorker.stop (   self)
Ask the worker to finish early; checked between fetchers.

Member Data Documentation

◆ _stop

uninews.ui.fetch_worker.FetchWorker._stop
protected

◆ fetch_group

uninews.ui.fetch_worker.FetchWorker.fetch_group

◆ fetchers

uninews.ui.fetch_worker.FetchWorker.fetchers

◆ finished_fetching

uninews.ui.fetch_worker.FetchWorker.finished_fetching = pyqtSignal(list)
static

◆ progress

uninews.ui.fetch_worker.FetchWorker.progress = pyqtSignal(int, int, str)
static

◆ results

uninews.ui.fetch_worker.FetchWorker.results

The documentation for this class was generated from the following file: