Re: Restarting a Beanstalk

552 views
Skip to first unread message

smallfish

unread,
Jun 12, 2012, 9:52:09 PM6/12/12
to beansta...@googlegroups.com
look ubuntu beanstalkd package, file: /etc/init.d/beanstalkd like this:

stop_server() {
# Stop the process using the wrapper
        if [ -z "$DAEMONUSER" ] ; then
            killproc -p $PIDFILE $DAEMON
            errcode=$?
        else
# if we are using a daemonuser then look for process that match
            start-stop-daemon --stop --quiet --pidfile $PIDFILE \
                        --user $DAEMONUSER \
                        --exec $DAEMON
            errcode=$?
        fi
        rm -f $PIDFILE

        return $errcode
}

 restart|force-reload)
        log_daemon_msg "Restarting $DESC" "$NAME"
        errcode=0
        stop_server || errcode=$?
        # Wait some sensible amount, some server need this
        [ -n "$DIETIME" ] && sleep $DIETIME
        start_server || errcode=$?
        [ -n "$STARTTIME" ] && sleep $STARTTIME
        running || errcode=$?
        log_end_msg $errcode
        ;;


hah, kill~
--


On Wed, Jun 13, 2012 at 12:13 AM, aPhRo_ <sam.e...@gmail.com> wrote:
Hi,

Forgive me if this is already been discussed on the list, but I can't seem to find anywhere that mentions a method of restarting a beanstalk instance.

For example, on our continuous integration server we have beanstalk running, however we'd like to be able to send a command to clear this to a default restarted state before each project is built and tested.

Is there a method to do this?

--
You received this message because you are subscribed to the Google Groups "beanstalk-talk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/beanstalk-talk/-/hjvYhWnpqz4J.
To post to this group, send email to beansta...@googlegroups.com.
To unsubscribe from this group, send email to beanstalk-tal...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/beanstalk-talk?hl=en.

Chad Kouse

unread,
Jun 13, 2012, 2:59:39 AM6/13/12
to beansta...@googlegroups.com
I guess I'd recommend not running in binlog mode and then just hup'ing the beanstalkd executable. 

--
Chad Kouse

Reply all
Reply to author
Forward
0 new messages