Commit 96a42f86 authored by Barkin Simsek's avatar Barkin Simsek 🐢
Browse files

Refactor job scheduler

parent 491e2dbb
Pipeline #7419 passed with stages
in 2 minutes and 39 seconds
......@@ -46,21 +46,24 @@ class ScheduleJobs:
Goes over all available domains and inserts a new job for fetching them
with Tor Browser and Firefox Browser
"""
# pylint: disable=C0121
# Get the list of domains
domains = self.__db_session.query(Domain).all()
tor_browser = (
self.__db_session.query(Fetcher)
.filter(Fetcher.method == "tor_browser")
.filter(Fetcher.uses_tor == True)
.first()
)
firefox_browser = (
self.__db_session.query(Fetcher)
.filter(Fetcher.method == "firefox_browser")
.filter(Fetcher.uses_tor == False)
.first()
)
relay = (
self.__db_session.query(Relay)
.filter(Relay.ipv4_exiting_allowed == True) # pylint: disable=C0121
.filter(Relay.ipv4_exiting_allowed == True)
.first()
)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment