Module backend.chrome_controller.chrome_controller_start
Starts a Chrome controller by running a job in a new thread.
The code initializes a Chrome controller by starting a new thread to run a specified job, which involves calling a Python script in a separate process.
Args
workingdir:str- The working directory where the job is located.
Returns
None
Classes
class ChromeController-
Start a new thread to run a specified job.
This method initiates a new thread to execute a specific job provided with the working directory.
Args
workingdir:str- The working directory where the job is located.
Returns
None
Expand source code
class ChromeController: """ Start a new thread to run a specified job. This method initiates a new thread to execute a specific job provided with the working directory. Args: workingdir (str): The working directory where the job is located. Returns: None """ def start(self, workingdir): def chrome(): """ Function to start the job reset classifier. This function calls the job_reset_classifier.py script using the subprocess call. """ job = 'python ' + os.path.join(workingdir, "jobs", 'job_chrome.py') os.system(job) # Create a new thread for the classifier function and start it process1 = threading.Thread(target=chrome) process1.start()Methods
def start(self, workingdir)