Mailspring/scripts/run-redis.sh
Karim Hamidou ae32666609 [cloud-api] Base infrastructure for running cloud workers
Summary:
I've decided to break my snooze patches in multiple parts to make it easier to review. This diff contains all the code related to running workers in the cloud. Cloud workers all inherit from the `Worker` class which defines a bunch of useful things like error handling.

What's left to do:
- spawn workers based on the plugin type
- add monitoring (I'm going to add a simple HTTP endpoint for that)
- writing a migration for the local sync db and the prod metadata db.

Test Plan: Tested manually.

Reviewers: halla, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D3814
2017-02-02 16:14:59 -08:00

16 lines
445 B
Bash
Executable file

#!/bin/sh
# Redis is one of those servers which by default
# accept connections from everywhere. Luckily,
# homebrew and presumably debian come with sane
# defaults. However, they're located in different
# directories.
if [[ $(uname) = 'Darwin' ]]; then
echo "Running redis from Homebrew..."
redis-server /usr/local/etc/redis.conf
fi
if [[ $(uname) = 'Linux' ]]; then
echo "Running redis"
redis-server /etc/redis/redis.conf
fi