Module backend.backend_controller_start

Main script to start and manage different controllers and processes for a scraping application.

This script initializes and runs multiple controllers for different components of the application in separate threads. It uses the threading module to concurrently execute these controllers.

Dependencies

  • time: For timing-related operations.
  • os: For interacting with the operating system, including file path operations.
  • sys: For system-specific parameters and functions (though not used in this script).
  • inspect: For inspecting live objects.
  • threading: For running processes concurrently.
  • subprocess: For spawning new processes.
  • apscheduler.schedulers.background: For scheduling tasks (imported but not used in this script).
  • datetime: For working with dates and times (imported but not used in this script).

Functions

def chrome()

Function to start the Chrome Controller process.

Uses the subprocess.call() function to execute the chrome_controller_start.py script.

def classifier()

Function to start the Classifier Controller process.

Uses the subprocess.call() function to execute the classifier_controller_start.py script.

def scraper()

Function to start the Scraper Controller process.

Uses the subprocess.call() function to execute the scraper_controller_start.py script.

def source()

Function to start the Sources Controller process.

Uses the subprocess.call() function to execute the sources_controller_start.py script.