-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathmetadata_journey_oss.py
More file actions
693 lines (602 loc) Β· 28 KB
/
Copy pathmetadata_journey_oss.py
File metadata and controls
693 lines (602 loc) Β· 28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
#!/usr/bin/env python3
"""
Metadata Management Journey for Conductor OSS
=============================================
This example demonstrates the core Metadata Management APIs available in
Conductor OSS (Open Source) through a narrative journey of building a
workflow system for an online education platform.
This version is specifically designed for Conductor OSS and doesn't require
Orkes-specific features like authentication or advanced tagging.
APIs Covered:
------------
Workflow Definition:
- register_workflow_def() - Register new workflow
- update_workflow_def() - Update workflow
- get_workflow_def() - Get specific workflow
- get_all_workflow_defs() - List all workflows
- unregister_workflow_def() - Delete workflow
Task Definition:
- register_task_def() - Register new task
- update_task_def() - Update task
- get_task_def() - Get specific task
- get_all_task_defs() - List all tasks
- unregister_task_def() - Delete task
Run:
python examples/metadata_journey_oss.py
python examples/metadata_journey_oss.py --no-cleanup # Keep metadata for inspection
"""
import os
import sys
import time
import argparse
from typing import List, Optional
from conductor.client.orkes.orkes_metadata_client import OrkesMetadataClient
# Add src to path for local development
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', 'src'))
from conductor.client.configuration.configuration import Configuration
from conductor.client.metadata_client import MetadataClient
from conductor.client.http.models.workflow_def import WorkflowDef
from conductor.client.http.models.workflow_task import WorkflowTask
from conductor.client.http.models.task_def import TaskDef
from conductor.client.workflow.conductor_workflow import ConductorWorkflow
from conductor.client.workflow.executor.workflow_executor import WorkflowExecutor
from conductor.client.workflow.task.simple_task import SimpleTask
class MetadataJourneyOSS:
"""
A comprehensive journey through Metadata Management APIs in Conductor OSS.
Story: Building a workflow system for an online education platform
that handles course enrollment, content delivery, and student assessment.
"""
def __init__(self):
"""Initialize the client and workflow executor for Conductor OSS."""
# Get configuration from environment or use localhost
server_url = os.getenv('CONDUCTOR_SERVER_URL', 'http://localhost:8080/api')
# Create configuration for Conductor OSS (no authentication needed)
config = Configuration(server_api_url=server_url)
# Initialize clients
self.metadata_client = OrkesMetadataClient(config)
self.workflow_executor = WorkflowExecutor(config)
# Track created resources for cleanup
self.created_workflows = []
self.created_tasks = []
print("=" * 80)
print("π CONDUCTOR OSS METADATA MANAGEMENT JOURNEY")
print("=" * 80)
print(f"Server: {server_url}")
print(f"API Docs: {server_url.replace('/api', '')}/api-docs")
print()
def chapter1_register_task_definitions(self):
"""Chapter 1: Register task definitions for the education platform."""
print("π CHAPTER 1: Registering Task Definitions")
print("-" * 40)
# Define tasks for our education platform
tasks = [
TaskDef(
name='validate_enrollment_oss',
description='Validate student enrollment request',
input_keys=['student_id', 'course_id'],
output_keys=['valid', 'errors', 'enrollment_id'],
timeout_seconds=300,
response_timeout_seconds=30,
retry_count=3,
retry_logic='FIXED',
retry_delay_seconds=10
),
TaskDef(
name='process_payment_oss',
description='Process course payment',
input_keys=['student_id', 'amount', 'payment_method'],
output_keys=['transaction_id', 'status'],
timeout_seconds=600,
response_timeout_seconds=30,
retry_count=5,
retry_logic='EXPONENTIAL_BACKOFF',
retry_delay_seconds=5,
rate_limit_per_frequency=100,
rate_limit_frequency_in_seconds=60
),
TaskDef(
name='assign_instructor_oss',
description='Assign instructor to student',
input_keys=['course_id', 'student_level'],
output_keys=['instructor_id', 'instructor_name'],
timeout_seconds=180,
response_timeout_seconds=30,
retry_count=2,
concurrent_exec_limit=10
),
TaskDef(
name='send_notification_oss',
description='Send notification to student',
input_keys=['student_email', 'message_type', 'content'],
output_keys=['sent', 'message_id'],
timeout_seconds=120,
retry_count=3,
response_timeout_seconds=60
),
TaskDef(
name='setup_course_oss',
description='Setup course materials and access',
input_keys=['student_id', 'course_id'],
output_keys=['course_url', 'materials'],
timeout_seconds=400,
response_timeout_seconds=30,
retry_count=2
),
TaskDef(
name='evaluate_student_oss',
description='Evaluate student performance',
input_keys=['student_id', 'test_results'],
output_keys=['score', 'grade', 'feedback'],
timeout_seconds=900,
response_timeout_seconds=30,
retry_count=1,
poll_timeout_seconds=300
)
]
# Register all tasks
print("Registering tasks...")
for task_def in tasks:
try:
self.metadata_client.register_task_def(task_def)
self.created_tasks.append(task_def.name)
print(f" β
Registered: {task_def.name}")
except Exception as e:
if "already exists" in str(e).lower():
print(f" βΉοΈ Task already exists: {task_def.name}")
self.created_tasks.append(task_def.name)
else:
print(f" β Failed to register {task_def.name}: {e}")
print(f"\nTotal tasks available: {len(self.created_tasks)}")
print()
def chapter2_create_simple_workflow(self):
"""Chapter 2: Create a simple sequential workflow."""
print("π CHAPTER 2: Creating Simple Sequential Workflow")
print("-" * 40)
# Create enrollment workflow using ConductorWorkflow builder
print("Creating basic enrollment workflow...")
enrollment_workflow = ConductorWorkflow(
executor=self.workflow_executor,
name=f'enrollment_basic_oss_{time.strftime("%Y%m%d-%H%M%S")}',
version=1,
description='Basic student enrollment workflow'
)
# Add tasks sequentially
enrollment_workflow >> SimpleTask('validate_enrollment_oss', 'validate_ref')
enrollment_workflow >> SimpleTask('process_payment_oss', 'payment_ref')
enrollment_workflow >> SimpleTask('assign_instructor_oss', 'instructor_ref')
enrollment_workflow >> SimpleTask('send_notification_oss', 'notification_ref')
enrollment_workflow >> SimpleTask('setup_course_oss', 'setup_ref')
# Set input parameters
enrollment_workflow.input_parameters([
'student_id',
'course_id',
'payment_method',
'student_email'
])
# Register the workflow
workflow_def = enrollment_workflow.to_workflow_def()
try:
self.metadata_client.register_workflow_def(workflow_def, overwrite=True)
self.created_workflows.append(('enrollment_basic_oss', 1))
print("β
Registered basic enrollment workflow")
except Exception as e:
print(f"β Failed to register workflow: {e}")
print()
def chapter3_create_decision_workflow(self):
"""Chapter 3: Create workflow with decision logic."""
print("π CHAPTER 3: Creating Workflow with Decision Logic")
print("-" * 40)
print("Creating assessment workflow with decisions...")
assessment_workflow = WorkflowDef(
name=f'assessment_workflow_oss_{time.strftime("%Y%m%d-%H%M%S")}',
version=1,
description='Student assessment with grade-based paths',
input_parameters=['student_id', 'course_id', 'test_results'],
timeout_seconds=3600,
tasks=[
# First evaluate the student
WorkflowTask(
name='evaluate_student_oss',
task_reference_name='evaluation',
input_parameters={
'student_id': '${workflow.input.student_id}',
'test_results': '${workflow.input.test_results}'
}
),
# Then make decision based on grade
WorkflowTask(
name='DECISION',
task_reference_name='grade_decision',
type='DECISION',
case_value_param='evaluation.output.grade',
decision_cases={
'A': [
WorkflowTask(
name='send_notification_oss',
task_reference_name='notify_excellence',
input_parameters={
'message_type': 'excellence',
'content': 'Congratulations on your excellent performance!'
}
)
],
'B': [
WorkflowTask(
name='send_notification_oss',
task_reference_name='notify_good',
input_parameters={
'message_type': 'good_performance',
'content': 'Good job on your assessment!'
}
)
],
'C': [
WorkflowTask(
name='setup_course_oss',
task_reference_name='remedial_setup',
input_parameters={
'course_id': 'remedial_${workflow.input.course_id}'
}
)
]
},
default_case=[
WorkflowTask(
name='send_notification_oss',
task_reference_name='notify_retry',
input_parameters={
'message_type': 'retry_required',
'content': 'Please schedule a retry for the assessment'
}
)
]
)
]
)
try:
self.metadata_client.register_workflow_def(assessment_workflow, overwrite=True)
self.created_workflows.append(('assessment_workflow_oss', 1))
print("β
Registered assessment workflow with decision logic")
except Exception as e:
print(f"β Failed to register workflow: {e}")
print()
def chapter4_create_parallel_workflow(self):
"""Chapter 4: Create workflow with parallel execution."""
print("π CHAPTER 4: Creating Workflow with Parallel Tasks")
print("-" * 40)
print("Creating onboarding workflow with parallel tasks...")
onboarding_workflow = WorkflowDef(
name=f'student_onboarding_oss_{time.strftime("%Y%m%d-%H%M%S")}',
version=1,
description='Parallel student onboarding tasks',
input_parameters=['student_id', 'course_id', 'student_email'],
tasks=[
# First validate enrollment
WorkflowTask(
name='validate_enrollment_oss',
task_reference_name='validate',
input_parameters={
'student_id': '${workflow.input.student_id}',
'course_id': '${workflow.input.course_id}'
}
),
# Then run parallel tasks
WorkflowTask(
name='FORK_JOIN',
task_reference_name='parallel_onboarding',
type='FORK_JOIN',
fork_tasks=[
# Branch 1: Setup course
[
WorkflowTask(
name='setup_course_oss',
task_reference_name='course_setup',
input_parameters={
'student_id': '${workflow.input.student_id}',
'course_id': '${workflow.input.course_id}'
}
)
],
# Branch 2: Send welcome email
[
WorkflowTask(
name='send_notification_oss',
task_reference_name='welcome_email',
input_parameters={
'student_email': '${workflow.input.student_email}',
'message_type': 'welcome',
'content': 'Welcome to the course!'
}
)
],
# Branch 3: Assign instructor
[
WorkflowTask(
name='assign_instructor_oss',
task_reference_name='assign',
input_parameters={
'course_id': '${workflow.input.course_id}',
'student_level': 'beginner'
}
)
]
]
),
WorkflowTask(
name='JOIN',
task_reference_name='join_onboarding',
type='JOIN',
join_on=['course_setup', 'welcome_email', 'assign']
)
]
)
try:
self.metadata_client.register_workflow_def(onboarding_workflow, overwrite=True)
self.created_workflows.append(('student_onboarding_oss', 1))
print("β
Registered onboarding workflow with parallel tasks")
except Exception as e:
print(f"β Failed to register workflow: {e}")
print()
def chapter5_retrieve_definitions(self):
"""Chapter 5: Retrieve and display metadata."""
print("π CHAPTER 5: Retrieving Metadata Definitions")
print("-" * 40)
# Get specific workflow
print("π Retrieving workflow definitions...")
for workflow_name, version in self.created_workflows:
try:
workflow = self.metadata_client.get_workflow_def(workflow_name, version=version)
print(f"\n⨠{workflow.name} v{workflow.version}")
print(f" Description: {workflow.description}")
print(f" Tasks: {len(workflow.tasks)}")
print(f" Input Parameters: {workflow.input_parameters}")
if workflow.timeout_seconds:
print(f" Timeout: {workflow.timeout_seconds}s")
except Exception as e:
print(f" β Could not retrieve {workflow_name}: {e}")
# Get all workflows
print("\nπ Listing all workflows in system...")
try:
all_workflows = self.metadata_client.get_all_workflow_defs()
print(f"Total workflows in system: {len(all_workflows)}")
# Show our workflows
our_workflows = [w for w in all_workflows
if any(w.name == name for name, _ in self.created_workflows)]
if our_workflows:
print("Our workflows:")
for wf in our_workflows:
task_types = set()
for task in wf.tasks:
task_types.add(task.type if hasattr(task, 'type') and task.type else 'SIMPLE')
print(f" - {wf.name}: {', '.join(task_types)} tasks")
except Exception as e:
print(f"β Could not list workflows: {e}")
# Get task definitions
print("\nπ Retrieving task definitions...")
try:
all_tasks = self.metadata_client.get_all_task_defs()
our_tasks = [t for t in all_tasks if t.name in self.created_tasks]
print(f"Our tasks ({len(our_tasks)} total):")
for task in our_tasks[:5]: # Show first 5
retry_info = f"retry={task.retry_count}" if task.retry_count else "no-retry"
print(f" - {task.name}: {retry_info}, timeout={task.timeout_seconds}s")
if len(our_tasks) > 5:
print(f" ... and {len(our_tasks) - 5} more")
except Exception as e:
print(f"β Could not list tasks: {e}")
print()
def chapter6_update_definitions(self):
"""Chapter 6: Update existing definitions."""
print("π CHAPTER 6: Updating Definitions")
print("-" * 40)
# Update a task definition
print("Updating task definition...")
try:
task = self.metadata_client.get_task_def('process_payment_oss')
print(f"Current settings for {task.name}:")
print(f" Timeout: {task.timeout_seconds}s")
print(f" Retry: {task.retry_count}")
# Update the task
task.description = 'Process payment with enhanced validation'
task.timeout_seconds = 900 # Increase timeout
task.retry_count = 7 # More retries
self.metadata_client.update_task_def(task)
print(f"\nβ
Updated {task.name}")
print(f" New timeout: {task.timeout_seconds}s")
print(f" New retry: {task.retry_count}")
except Exception as e:
print(f"β Could not update task: {e}")
# Update a workflow definition
print("\n\nUpdating workflow definition...")
try:
workflow = self.metadata_client.get_workflow_def('enrollment_basic_oss', version=1)
print(f"Current task count: {len(workflow.tasks)}")
# Update workflow
workflow.description = 'Enhanced enrollment workflow with validation'
workflow.timeout_seconds = 7200 # 2 hours
workflow.restartable = True
workflow.workflow_status_listener_enabled = True
# Add a final confirmation task
confirmation_task = WorkflowTask(
name='send_notification_oss',
task_reference_name=f'final_confirmation_{time.strftime("%Y%m%d-%H%M%S")}',
input_parameters={
'message_type': 'enrollment_complete',
'content': 'Your enrollment is complete!'
}
)
workflow.tasks.append(confirmation_task)
self.metadata_client.update_workflow_def(workflow, overwrite=True)
print(f"β
Updated {workflow.name}")
print(f" New task count: {len(workflow.tasks)}")
print(f" Restartable: {workflow.restartable}")
except Exception as e:
print(f"β Could not update workflow: {e}")
print()
def chapter7_create_version2(self):
"""Chapter 7: Create version 2 of workflows."""
print("π CHAPTER 7: Version Management")
print("-" * 40)
print("Creating version 2 of enrollment workflow...")
try:
# Get v1
v1_workflow = self.metadata_client.get_workflow_def('enrollment_basic_oss')
version = v1_workflow.version + 1
# Create v2 with improvements
v2_workflow = WorkflowDef(
name='enrollment_basic_oss',
version=version,
description='Enrollment v2 with payment verification',
input_parameters=v1_workflow.input_parameters + ['discount_code'],
tasks=v1_workflow.tasks.copy()
)
# Add payment verification after payment task
verification_task = WorkflowTask(
name='validate_enrollment_oss',
task_reference_name='verify_payment',
input_parameters={
'student_id': '${workflow.input.student_id}',
'course_id': 'payment_verification'
}
)
# Insert after payment (position 2)
# if len(v2_workflow.tasks) >= 2:
# v2_workflow.tasks.insert(2, verification_task)
self.metadata_client.register_workflow_def(v2_workflow, overwrite=True)
self.created_workflows.append(('enrollment_basic_oss', 2))
print("β
Created version 2")
print(f" Version 1 tasks: {len(v1_workflow.tasks)}")
print(f" Version 2 tasks: {len(v2_workflow.tasks)}")
print(f" New input: discount_code")
except Exception as e:
print(f"β Could not create v2: {e}")
print()
def chapter8_metadata_summary(self):
"""Chapter 8: Display metadata summary."""
print("π CHAPTER 8: Metadata Summary Dashboard")
print("-" * 40)
print("π METADATA SUMMARY")
print("=" * 60)
try:
# Workflow statistics
all_workflows = self.metadata_client.get_all_workflow_defs()
our_workflows = [w for w in all_workflows
if any(w.name == name for name, _ in self.created_workflows)]
print(f"\nπ WORKFLOWS ({len(our_workflows)} total)")
print("-" * 30)
for workflow in our_workflows:
print(f"\n{workflow.name} v{workflow.version}")
print(f" Description: {workflow.description[:60]}...")
print(f" Tasks: {len(workflow.tasks)}")
# Count task types
task_types = {}
for task in workflow.tasks:
task_type = task.type if hasattr(task, 'type') and task.type else 'SIMPLE'
task_types[task_type] = task_types.get(task_type, 0) + 1
if task_types:
types_str = ", ".join([f"{t}:{c}" for t, c in task_types.items()])
print(f" Task Types: {types_str}")
# Task statistics
all_tasks = self.metadata_client.get_all_task_defs()
our_tasks = [t for t in all_tasks if t.name in self.created_tasks]
print(f"\n\nπ TASKS ({len(our_tasks)} total)")
print("-" * 30)
# Group by characteristics
retriable_tasks = [t for t in our_tasks if t.retry_count and t.retry_count > 0]
rate_limited_tasks = [t for t in our_tasks if t.rate_limit_per_frequency]
concurrent_limited = [t for t in our_tasks if t.concurrent_exec_limit]
print(f"\n Retriable tasks: {len(retriable_tasks)}")
for task in retriable_tasks[:3]:
print(f" - {task.name}: {task.retry_count} retries")
if rate_limited_tasks:
print(f"\n Rate-limited tasks: {len(rate_limited_tasks)}")
for task in rate_limited_tasks:
print(f" - {task.name}: {task.rate_limit_per_frequency}/{task.rate_limit_frequency_in_seconds}s")
if concurrent_limited:
print(f"\n Concurrency-limited tasks: {len(concurrent_limited)}")
for task in concurrent_limited:
print(f" - {task.name}: max {task.concurrent_exec_limit} concurrent")
# Overall statistics
print(f"\n\nπ STATISTICS")
print("-" * 30)
total_retry_capacity = sum(t.retry_count for t in our_tasks if t.retry_count)
avg_timeout = sum(t.timeout_seconds for t in our_tasks) / len(our_tasks) if our_tasks else 0
print(f" Total Workflows: {len(our_workflows)}")
print(f" Total Tasks: {len(our_tasks)}")
print(f" Avg Task Timeout: {avg_timeout:.0f}s")
print(f" Total Retry Capacity: {total_retry_capacity}")
print(f" Rate Limited Tasks: {len(rate_limited_tasks)}")
except Exception as e:
print(f"β Could not generate summary: {e}")
print()
def chapter9_cleanup(self, cleanup=True):
"""Chapter 9: Clean up resources."""
print("π CHAPTER 9: Cleanup")
print("-" * 40)
if not cleanup:
print("βΉοΈ Cleanup skipped (--no-cleanup flag)")
print("Resources left for inspection:")
print(f" - {len(self.created_workflows)} workflows")
print(f" - {len(self.created_tasks)} tasks")
return
print("Cleaning up created resources...")
# Delete workflows
for workflow_name, version in self.created_workflows:
try:
self.metadata_client.unregister_workflow_def(workflow_name, version)
print(f" β
Deleted: {workflow_name} v{version}")
except Exception as e:
if "not found" not in str(e).lower():
print(f" β οΈ Could not delete {workflow_name} v{version}: {e}")
# Delete tasks
for task_name in self.created_tasks:
try:
self.metadata_client.unregister_task_def(task_name)
print(f" β
Deleted: {task_name}")
except Exception as e:
if "not found" not in str(e).lower():
print(f" β οΈ Could not delete {task_name}: {e}")
print("\nβ
Cleanup completed")
def run_journey(self, cleanup=True):
"""Run the complete metadata management journey."""
try:
self.chapter1_register_task_definitions()
self.chapter2_create_simple_workflow()
self.chapter3_create_decision_workflow()
self.chapter4_create_parallel_workflow()
self.chapter5_retrieve_definitions()
self.chapter6_update_definitions()
self.chapter7_create_version2()
self.chapter8_metadata_summary()
print("=" * 80)
print("β
CONDUCTOR OSS METADATA JOURNEY COMPLETED!")
print("=" * 80)
print()
print("π Summary:")
print(f" - Created {len(self.created_tasks)} task definitions")
print(f" - Created {len(self.created_workflows)} workflow definitions")
print(f" - Demonstrated core metadata management APIs")
print(f" - Covered sequential, decision, and parallel workflows")
print()
except Exception as e:
print(f"\nβ Journey failed: {e}")
import traceback
traceback.print_exc()
finally:
self.chapter9_cleanup(cleanup)
def main():
"""Main entry point."""
parser = argparse.ArgumentParser(
description='Conductor OSS Metadata Management Journey'
)
parser.add_argument(
'--no-cleanup',
action='store_true',
help='Skip cleanup to keep metadata for inspection'
)
args = parser.parse_args()
journey = MetadataJourneyOSS()
journey.run_journey(cleanup=False)
if __name__ == '__main__':
main()