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

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

Build:
Build:
LAST BUILD BRANCH: transfer-ownership
DEFAULT BRANCH: master
Ran 17 Aug 2017 09:03PM UTC
Jobs 2
Files 19
Run time 3s
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
540

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%)

21.14 hits per line

Jobs
ID Job ID Ran Files Coverage
1 540.1 17 Aug 2017 09:03PM UTC 0
98.09
Travis Job 540.1
2 540.2 17 Aug 2017 09:03PM UTC 0
98.09
Travis Job 540.2
Source Files on build 540
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #540
  • 45c1745d on github
  • Prev Build on save-on-exit (#536)
  • Next Build on save-on-exit (#541)
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