Skip to content

Commit

Permalink
Use YAML workflows specs in tutorial
Browse files Browse the repository at this point in the history
Took 20 minutes


Took 37 seconds
  • Loading branch information
EpicWink committed Feb 26, 2020
1 parent d41954f commit 6f21e70
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 78 deletions.
14 changes: 7 additions & 7 deletions docs/src/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ We'll use `moto <https://github.com/spulec/moto>`_, a tool which mocks out SWF.
Set-up
------

Install ``moto``, ``awscli`` and ``seddy``
Install Moto, AWS CLI, `PyYaml <https://github.com/yaml/pyyaml>`_ and seddy

.. code-block:: shell
pip install moto[server] awscli seddy
pip install moto[server] awscli pyyaml seddy
.. _env-vars:

Expand All @@ -47,10 +47,10 @@ Create workflow definitions file
.. raw:: html

<details>
<summary><a>workflows.json</a></summary>
<summary><a>workflows.yml</a></summary>

.. include:: workflows.json
:code: json
.. include:: workflows.yml
:code: yaml

.. raw:: html

Expand Down Expand Up @@ -79,7 +79,7 @@ Register defined workflows with SWF

.. code-block:: shell
seddy -v register workflows.json test-domain
seddy -v register workflows.yml test-domain
----

Expand Down Expand Up @@ -113,7 +113,7 @@ Start the decider (in a separate terminal: don't forget :ref:`env-vars`)

.. code-block:: shell
seddy -v decider workflows.json test-domain test-list
seddy -v decider workflows.yml test-domain test-list
----

Expand Down
71 changes: 0 additions & 71 deletions docs/src/workflows.json

This file was deleted.

50 changes: 50 additions & 0 deletions docs/src/workflows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
version: 1.0
workflows:
- spec_type: dag
name: spam
version: "1.0"
description: A workflow with spam, spam, eggs and spam.
registration_defaults:
task_timeout: 5
execution_timeout: 3600
task_list: coffee
tasks:
- id: foo
type:
name: spam-foo
version: "0.3"
timeout: 10
task_list: eggs
priority: 1
- id: bar
type:
name: spam-foo
version: "0.4"
timeout: 10
task_list: eggs
dependencies:
- foo
- spec_type: dag
name: spam
version: "1.1"
description: A workflow with better spam, spam, eggs and spam.
registration_defaults:
task_timeout: 5
execution_timeout: 3600
task_list: coffee
tasks:
- id: foo
type:
name: spam-foo
version: "0.4"
timeout: 5
task_list: eggs
priority: 1
- id: bar
type:
name: spam-foo
version: "0.4"
timeout: 5
task_list: eggs
dependencies:
- foo

0 comments on commit 6f21e70

Please sign in to comment.