def METHOD_NAME(self, name, masterid):
    activated = yield self.master.db.masters.setMasterState(
        masterid=masterid, active=True)
    if activated:
        self.produceEvent({"masterid": masterid, "name": name, "active": True}, 'started')