def do_instance_alloc( self, component_handle, tasklet_info, instance_url, ): """Create a tasklet instance Arguments: component_handle - the handle associated with this component tasklet_info - information about the tasklet that is being created instance_url - the instance URL Returns: An instance handle """ instance_handle = rwtasklet.InstanceHandle() # NB: this is essentially the reason for the metaclass. Here we # are using the new tasklet type that was created above. tasklet = tasklet_type(tasklet_info) # Add the new tasklet to the dict of tasklets and use the # component and instances handles (as a pair) to define the # key. self.tasklets[(component_handle, instance_handle)] = tasklet return instance_handle
def do_instance_alloc(self, component_handle, tasklet_info, instance_url): """This function is called for each new instance of the tasklet. The tasklet specific information such as scheduler instance, trace context, logging context are passed in 'tasklet_info' variable. This function stores the tasklet information locally. """ logger.debug("RwdtstaskletPython: do_instance_alloc function called") self.taskletinfo = tasklet_info # Save the scheduler instance and tasklet instance objects #self.rwsched = tasklet_info.rwsched_instance #self.tasklet = tasklet_info.rwsched_tasklet_info #self.rwlog_instance = tasklet_info.rwlog_instance tasklet_logger = rwlogger.RwLogger(subcategory="rw-vcs", log_hdl=self.taskletinfo.rwlog_ctx) logger.addHandler(tasklet_logger) # After this point, all logger calls will log events to rw_vcs using # the tasklets rwlog handle logger.debug("Added rwlogger handler to tasklet logger") instance_handle = RwTaskletPlugin.InstanceHandle() return instance_handle
def do_instance_alloc(self, component_handle, tasklet_info, instance_url): """This function is called for each new instance of the tasklet. The tasklet specific information such as scheduler instance, trace context, logging context are passed in 'tasklet_info' variable. This function stores the tasklet information locally. """ logger.debug("RwDtsScheduler: do_instance_alloc function called") self.taskletinfo = tasklet_info instance_handle = RwTaskletPlugin.InstanceHandle() return instance_handle