• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

xethorn / garcon / 293
95%
master: 95%

Build:
Build:
LAST BUILD BRANCH: xethorn-patch-1
DEFAULT BRANCH: master
Ran 01 Jul 2015 03:31PM UTC
Jobs 2
Files 9
Run time 8min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
293

push

travis-ci

xethorn
Add support for manual deciders.

Some flows are more complex than others. For instance: some activities can
be scheduled based on a condition in the context. Being able to (easily)
write the decider has a lot of advantages.

For this: in your flow, you need to define a decider method that takes a
`schedule` param. To call an activity, all you have to do is to call
`schedule`, provide an immutable id, the activity and a list (if necessary)
of requirements. Example:

```python
def decider(schedule):
    activity_1 = schedule(
        'activity_1', test_activity_1)
    activity_2 = schedule(
        'activity_2', test_activity_2, requires=[activity_1])

    for i in range(3):
        activity_3 = schedule(
            'activity-3.{}'.format(i), test_activity_3, requires=[activity_2])

        if activity_3.ready and activity_2.result.get('4') == 4:
            last_activity = schedule(
                'last_activity.{}'.format(i), test_activity_last,
                input=dict(the='end'))
```

Remember: the decider is called anytime you have an event has occurred. So this
method should only be focused on scheduling (and nothing else).

@rantonmattei

455 of 562 relevant lines covered (80.96%)

1.62 hits per line

Jobs
ID Job ID Ran Files Coverage
1 293.1 01 Jul 2015 03:39PM UTC 0
80.96
Travis Job 293.1
2 293.2 01 Jul 2015 03:31PM UTC 0
80.96
Travis Job 293.2
Source Files on build 293
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #293
  • 58d36636 on github
  • Prev Build on add-version (#281)
  • Next Build on add-version (#295)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc