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

mbland / custom-links / 540 / 1
98%
master: 98%

Build:
Build:
LAST BUILD BRANCH: transfer-ownership
DEFAULT BRANCH: master
Ran 17 Aug 2017 09:03PM UTC
Files 19
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

17 Aug 2017 08:50PM UTC coverage: 98.089% (+1.1%) from 97.039%
540.1

push

travis-ci

mbland
serve: Ensure redis-server saves after signal

This is part one of improved shutdown handling; part two will come in a
future commit involving a more graceful shutdown of the main node
process itself.

I began to notice that running `./go serve` to launch the redis-server,
using the app, and then killing the script quickly resulted in data
loss. This didn't happen when running redis-server manually, as a signal
sent to that process would result in it saving its data before exiting.
The problem appeared to be that signals sent to the `./go serve` script
would be sent simultaneously to the redis-server process, under which
circumstances it wouldn't save its data automatically.

The script now launches redis-server in a separate process group so that
any signals sent to the script aren't sent to the redis-server process.
The custom-links server itself now runs as a background process so that
the it can be managed explicitly via a trap on the TERM, INT, and HUP
signals. Finally, an EXIT trap sends the `shutdown save` command to the
redis-server and waits for the process to exit to complete a graceful
shutdown with all data saved.

291 of 318 branches covered (91.51%)

Branch coverage included in aggregate %.

2583 of 2612 relevant lines covered (98.89%)

10.57 hits per line

Source Files on job 540.1
  • Tree
  • List 0
  • Changed 3
  • Source Changed 2
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 540
  • Travis Job 540.1
  • 45c1745d on github
  • Prev Job for on save-on-exit (#536.2)
  • Next Job for on save-on-exit (#541.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