本文整理汇总了Python中dart.client.python.dart_client.Dart.save_event方法的典型用法代码示例。如果您正苦于以下问题:Python Dart.save_event方法的具体用法?Python Dart.save_event怎么用?Python Dart.save_event使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dart.client.python.dart_client.Dart
的用法示例。
在下文中一共展示了Dart.save_event方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Action
# 需要导入模块: from dart.client.python.dart_client import Dart [as 别名]
# 或者: from dart.client.python.dart_client.Dart import save_event [as 别名]
datastore.id,
state=WorkflowState.ACTIVE,
on_failure_email=['[email protected]'],
on_success_email=['[email protected]'],
on_started_email=['[email protected]'],
)
), datastore.id)
print 'created workflow: %s' % workflow.id
a0, a1 = dart.save_actions([
Action(data=ActionData('start_datastore', 'start_datastore', state=ActionState.TEMPLATE)),
Action(data=ActionData('load_dataset', 'load_dataset', state=ActionState.TEMPLATE, args={
'dataset_id': dataset.id,
's3_path_start_prefix_inclusive': 's3://example-bucket/prd/beacon/native_app/v2/parquet/snappy/createdpartition=2015-06-27',
})),
], workflow_id=workflow.id)
print 'created action: %s' % a0.id
print 'created action: %s' % a1.id
event = dart.save_event(Event(data=EventData('beacon_native_app_to_parquet_emr_job_completion', state=EventState.ACTIVE)))
print 'created event: %s' % event.id
trigger = dart.save_trigger(Trigger(data=TriggerData(
'beacon_native_app_to_parquet_emr_job_completion_trigger',
'event',
[workflow.id],
{'event_id': event.id}))
)
print 'created trigger: %s' % trigger.id