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

cloudmarker / cloudmarker / 676
84%

Build:
DEFAULT BRANCH: master
Ran 01 May 2019 08:25AM UTC
Jobs 3
Files 35
Run time 3min
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
676

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.

328 of 374 branches covered (87.7%)

Branch coverage included in aggregate %.

1613 of 1775 relevant lines covered (90.87%)

2.73 hits per line

Jobs
ID Job ID Ran Files Coverage
1 676.1 01 May 2019 08:29AM UTC 0
90.58
Travis Job 676.1
2 676.2 01 May 2019 08:25AM UTC 0
90.58
Travis Job 676.2
3 676.3 01 May 2019 08:28AM UTC 0
90.58
Travis Job 676.3
Source Files on build 676
Detailed source file information is not available for this build.
  • Back to Repo
  • Build #676
  • 42c895f1 on github
  • Prev Build on master (#667)
  • Next Build on master (#679)
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