Exemple #1
0
def site_check_process_wraper(func,
                              func_arg=(),
                              func_kwarg=None,
                              callback=None,
                              Memlimit=200,
                              external_stop=None):
    mem_pro = MemoryControlPs(func, func_arg, func_kwarg, callback, Memlimit,
                              external_stop)
    mem_pro.start()
 def _filtering_process_wrapper(self):
     self.filter_process = MemoryControlPs(
         func=filtering_process,
         func_kwargs=FilterController.get_input_parameters(
             "filtering.db", get_recovery_dir_path(),
             self._filter_input_queue, self._filter_output_queue,
             self._stop_event, self._filter_matrix, self._accounts,
             self._filtering_only, self._filtering_offset,
             self._filtering_total),
         external_stop_event=self._stop_event)
     self.filter_process.start()
Exemple #3
0
 def checking_whois(self):
     optinmal = self.max_prcess * self.concurrent_page / 5
     if optinmal < 10:
         worker_number = 10
     else:
         worker_number = int(optinmal)
     mem_limit = self.memory_limit_per_process / 2
     if mem_limit < 200:
         mem_limit = 200
     self.whois_process = MemoryControlPs(
         whois_process,
         func_kwargs=WhoisChecker.get_input_parameters(
             self._whoisQueue, self.outputQueue, self.stop_event,
             worker_number),
         mem_limit=mem_limit,
         external_stop_event=self.stop_event)
     self.whois_process.start()
def checking_whois():
    # optinmal = self.max_prcess * self.concurrent_page/5
    optinmal = 260 * 3 / 5
    if optinmal < 10:
        worker_number = 10
    else:
        worker_number = int(optinmal)
    mem_limit = 1000
    if mem_limit < 200:
        mem_limit = 200
    stop_event = Event()
    kwargs = {
        "is_debug": True,
        "stop_event": stop_event,
        "max_worker": worker_number
    }
    whois_process_wrapper = MemoryControlPs(whois_process,
                                            func_kwargs=kwargs,
                                            mem_limit=mem_limit,
                                            external_stop_event=stop_event)
    whois_process_wrapper.start()