Skip to content

Commit

Permalink
Rename tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
pirxthepilot committed May 14, 2023
1 parent 77bdec0 commit 938793e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
26 changes: 13 additions & 13 deletions wtfis/handlers/domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,27 +73,27 @@ def _fetch_greynoise(self) -> None:
raise

def fetch_data(self):
task1 = self.progress.add_task("Fetching data from Virustotal")
self.progress.update(task1, advance=33)
task_v = self.progress.add_task("Fetching data from Virustotal")
self.progress.update(task_v, advance=33)
self._fetch_vt_domain()
if self.max_resolutions != 0:
self.progress.update(task1, advance=33)
self.progress.update(task_v, advance=33)
self._fetch_vt_resolutions()
self.progress.update(task1, completed=100)
self.progress.update(task_v, completed=100)

if self.resolutions and self.resolutions.data:
task2 = self.progress.add_task(f"Fetching IP enrichments from {self._enricher.name}")
self.progress.update(task2, advance=50)
task_r = self.progress.add_task(f"Fetching IP enrichments from {self._enricher.name}")
self.progress.update(task_r, advance=50)
self._fetch_ip_enrichments()
self.progress.update(task2, completed=100)
self.progress.update(task_r, completed=100)

if self._greynoise:
task3 = self.progress.add_task(f"Fetching IP enrichments from {self._greynoise.name}")
self.progress.update(task3, advance=50)
task_g = self.progress.add_task(f"Fetching IP enrichments from {self._greynoise.name}")
self.progress.update(task_g, advance=50)
self._fetch_greynoise()
self.progress.update(task3, completed=100)
self.progress.update(task_g, completed=100)

task4 = self.progress.add_task(f"Fetching domain whois from {self._whois.name}")
self.progress.update(task4, advance=50)
task_w = self.progress.add_task(f"Fetching domain whois from {self._whois.name}")
self.progress.update(task_w, advance=50)
self._fetch_whois()
self.progress.update(task4, completed=100)
self.progress.update(task_w, completed=100)
24 changes: 12 additions & 12 deletions wtfis/handlers/ip.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,23 @@ def _fetch_greynoise(self) -> None:
raise

def fetch_data(self):
task1 = self.progress.add_task("Fetching data from Virustotal")
self.progress.update(task1, advance=50)
task_v = self.progress.add_task("Fetching data from Virustotal")
self.progress.update(task_v, advance=50)
self._fetch_vt_ip_address()
self.progress.update(task1, completed=100)
self.progress.update(task_v, completed=100)

task2 = self.progress.add_task(f"Fetching IP enrichments from {self._enricher.name}")
self.progress.update(task2, advance=50)
task_i = self.progress.add_task(f"Fetching IP enrichments from {self._enricher.name}")
self.progress.update(task_i, advance=50)
self._fetch_ip_enrichments()
self.progress.update(task2, completed=100)
self.progress.update(task_i, completed=100)

if self._greynoise:
task3 = self.progress.add_task(f"Fetching IP enrichments from {self._greynoise.name}")
self.progress.update(task3, advance=50)
task_g = self.progress.add_task(f"Fetching IP enrichments from {self._greynoise.name}")
self.progress.update(task_g, advance=50)
self._fetch_greynoise()
self.progress.update(task3, completed=100)
self.progress.update(task_g, completed=100)

task4 = self.progress.add_task(f"Fetching IP whois from {self._whois.name}")
self.progress.update(task4, advance=50)
task_w = self.progress.add_task(f"Fetching IP whois from {self._whois.name}")
self.progress.update(task_w, advance=50)
self._fetch_whois()
self.progress.update(task4, completed=100)
self.progress.update(task_w, completed=100)

0 comments on commit 938793e

Please sign in to comment.