def __init__(self, context=None):
		# app config
		self.conf = Configuration()

		# module config
		self.name = osp.basename(osp.dirname(osp.abspath(sys.argv[0])))
		self.pidfile = "tmp/pids/%s.pid" % self.name
		config_logger("logs/%s.log" % self.name, self.conf.log_level)

		# zmq context
		self.context = context or zmq.Context.instance()

		# pool of greenlets
		self.jobs = gevent.pool.Group()

		# zmq REQ/REP API
		self.rpc = RpcServer(self, self.name % "ipc://tmp/sockets/rpc/%s.sock")
		self.rpc.run()

		# spawn jobs
		bases = self.__class__.__mro__
		for base in bases:
			for func in base.__dict__.values():
				if getattr(func, 'job', None):
					method = func.__get__(self, self.__class__)
					self.jobs.spawn(method)
dataset/ETHPy150Open alexcepoi/pyscale/pyscale/lib/module.py/BaseModule.__init__/swapped operands of `%`