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

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

Build:
Build:
LAST BUILD BRANCH: xethorn-patch-1
DEFAULT BRANCH: master
Ran 01 Jul 2015 03:31PM 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 03:22PM UTC coverage: 80.961% (-7.7%) from 88.632%
293.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

455 of 562 relevant lines covered (80.96%)

0.81 hits per line

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