NAMD / pypelinin

Python library to distribute jobs and pipelines among a cluster
3 stars 5 forks source link

Give workers access to a logger #25

Open flavioamieiro opened 11 years ago

flavioamieiro commented 11 years ago

Maybe the base Worker class' init should receive and store in an instance variable the logger, so I could have a simple worker

from pypelinin import Worker

class MyWorker(Worker):

def process(data):
    self.logger.info(data)

and the call would look like:

MyWorker(logger=my_logger).process(data)