コード例 #1
0
ファイル: RawRunner.py プロジェクト: mighted/ReadableWebProxy
    def run_prof(cls,
                 num,
                 total_worker_count,
                 worker_num,
                 response_queue,
                 new_job_queue,
                 cookie_lock,
                 nosig=True):

        logSetup.resetLoggingLocks()
        common.process.name_process(
            "raw fetcher processing worker w-profiling")

        pid = os.getpid()
        try:
            cProfile.runctx(
                'cls.run(num, response_queue, new_job_queue, cookie_lock, nosig)',
                globals(), locals(), 'prof%d.prof' % pid)
        except Exception as e:
            print("Wat?")
            print("Wat?")
            print("Wat?")
            print("Wat?")
            print("Wat?")
            print("Wat?")
            print("Wat?")
            traceback.print_exc()
            raise e
コード例 #2
0
    def run(cls,
            num,
            total_worker_count,
            worker_num,
            response_queue,
            new_job_queue,
            cookie_lock,
            nosig=True):
        logSetup.resetLoggingLocks()
        common.process.name_process("proc fetcher processing worker")

        common.stuck.install_pystuck()

        # Misc.install_vmprof.install_vmprof("runner")

        # total_worker_count, worker_num are ignored at the moment.

        try:
            run = cls(num, response_queue, new_job_queue, cookie_lock, nosig)
            # print("Class instantiated: ", run)
            run.go()
        except Exception:
            print()
            print("Exception in sub-process!")
            traceback.print_exc()
コード例 #3
0
    def run(cls, num, response_queue, new_job_queue, cookie_lock, nosig=True):
        logSetup.resetLoggingLocks()
        install_pystuck()

        try:
            run = cls(num, response_queue, new_job_queue, cookie_lock, nosig)
            # print("Class instantiated: ", run)
            run.go()
        except Exception:
            print()
            print("Exception in sub-process!")
            traceback.print_exc()
コード例 #4
0
ファイル: RawRunner.py プロジェクト: woebbi/ReadableWebProxy
	def run(cls, num, total_worker_count, worker_num, response_queue, new_job_queue, cookie_lock, nosig=True):
		logSetup.resetLoggingLocks()
		common.process.name_process("raw fetcher processing worker")

		try:
			run = cls(num, total_worker_count, worker_num, response_queue, new_job_queue, cookie_lock, nosig)
			# print("Class instantiated: ", run)
			run.go()
		except Exception:
			print()
			print("Exception in sub-process!")
			traceback.print_exc()
コード例 #5
0
	def run(cls, num, total_worker_count, worker_num, response_queue, new_job_queue, cookie_lock, nosig=True):
		logSetup.resetLoggingLocks()
		common.stuck.install_pystuck()

		try:
			run = cls(num, total_worker_count, worker_num, response_queue, new_job_queue, cookie_lock, nosig)
			# print("Class instantiated: ", run)
			run.go()
		except Exception:
			print()
			print("Exception in sub-process!")
			traceback.print_exc()