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

cloudmarker / cloudmarker / 676 / 3
84%
master: 84%

Build:
DEFAULT BRANCH: master
Ran 01 May 2019 08:28AM UTC
Files 35
Run time 2s
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 May 2019 08:12AM UTC coverage: 90.58% (+0.02%) from 90.563%
676.3

push

travis-ci-com

susam
Populate `alert_worker` in `com` bucket

Prior to this change, the `com` bucket of events alerted with an alert
plugin looked like the following example:

    "com": {
      "record_type": "mock_event",
      "origin_worker": "mockaudit-mockevent",
      "origin_type": "event",
      "event_worker": "mockaudit-mockevent",
      "store_worker": "mockaudit-filestore"
    }

Note that the last key in the example above is named as `store_worker`
although alerting is done by alert plugins. This was so because store
plugins and alert plugins implement the exact same interface via
duck-typing, so both types of plugins were worked on by a function named
`store_worker`.

While this makes sense for us (the developers), finding a `store_worker`
key in data written by an alert plugin could be confusing to a user.
Therefore, with this change, the `com` bucket of events alerted with an
alert plugin looks like this:

    "com": {
      "record_type": "mock_event",
      "origin_worker": "mockaudit-mockevent",
      "origin_type": "event",
      "event_worker": "mockaudit-mockevent",
      "alert_worker": "mockaudit-filestore"
    }

To accomplish this behaviour, `workers.py` has been refactored by moving
the existing `store_worker` functionality to an internal `_write_worker`
function which can work on both store and alert plugins. It accepts an
additional parameter that tells it whether to populate `store_worker` or
`alert_worker` in the `com` bucket. Now there are two functions
`store_worker` and `alert_worker` which invoke with the `_write_worker`
function with the additional parameter to populate the `com` bucket
appropriately.

387 of 433 branches covered (89.38%)

Branch coverage included in aggregate %.

1613 of 1775 relevant lines covered (90.87%)

0.91 hits per line

Source Files on job 676.3
  • Tree
  • List 0
  • Changed 2
  • Source Changed 2
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 562
  • Travis Job 676.3
  • 42c895f1 on github
  • Prev Job for on master (#667.1)
  • Next Job for on master (#679.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