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

xethorn / garcon / 295 / 2
95%
master: 95%

Build:
Build:
LAST BUILD BRANCH: xethorn-patch-1
DEFAULT BRANCH: master
Ran 01 Jul 2015 04:53PM UTC
Files 9
Run time 1s
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

01 Jul 2015 04:45PM UTC coverage: 90.036% (+9.1%) from 80.961%
295.2

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

506 of 562 relevant lines covered (90.04%)

0.9 hits per line

Source Files on job 295.2
  • Tree
  • List 0
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 295
  • Travis Job 295.2
  • 8c1d1481 on github
  • Prev Job for on add-version (#293.2)
  • Next Job for on add-version (#297.1)
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