def resource_init_success( pipeline_name, execution_plan, log_manager, resource_instances, resource_init_times ): from dagster.core.execution.plan.plan import ExecutionPlan metadata_entries = [] for resource_key in resource_instances.keys(): resource_obj = resource_instances[resource_key] resource_time = resource_init_times[resource_key] metadata_entries.append( EventMetadataEntry.python_artifact( resource_obj.__class__, resource_key, "Initialized in {}".format(resource_time) ) ) return DagsterEvent.from_resource( pipeline_name=check.str_param(pipeline_name, "pipeline_name"), execution_plan=check.inst_param(execution_plan, "execution_plan", ExecutionPlan), log_manager=check.inst_param(log_manager, "log_manager", DagsterLogManager), message="Finished initialization of resources [{}].".format( ", ".join(sorted(resource_init_times.keys())) ), event_specific_data=EngineEventData( metadata_entries=metadata_entries, marker_end="resources", ), )
def resource_init_success(execution_plan, log_manager, resource_instances, resource_init_times): from dagster.core.execution.plan.plan import ExecutionPlan metadata_entries = [] for resource_key in resource_instances.keys(): resource_obj = resource_instances[resource_key] resource_time = resource_init_times[resource_key] metadata_entries.append( EventMetadataEntry.python_artifact( resource_obj.__class__, resource_key, 'Initialized in {}'.format(resource_time))) return DagsterEvent.from_resource( execution_plan=check.inst_param(execution_plan, 'execution_plan', ExecutionPlan), log_manager=check.inst_param(log_manager, 'log_manager', DagsterLogManager), message='Finished initialization of resources [{}].'.format( ', '.join(resource_init_times.keys())), event_specific_data=EngineEventData( metadata_entries=metadata_entries, marker_end='resources', ), )