75 Commits (bc8fe2988d2280380ab32ac734c84bdebdad2038)

Author SHA1 Message Date
Vincent Driessen 37b3bb4bd4 Have Worker.work() setup logging.
Basically, I don't want to enforce users to configure _any_ logging
stack when writing a basic worker, like this:

    from rq import Worker, Queue, Connection

    with Connection():
        q = Queue()
        w = Worker([q])
        w.work(burst=True)

In case you want to disable logging altogether, you can configure your
logging stack to do so.
13 years ago
Selwin Ong 40d0a7d9a9 Removed __main__ that was accidentally added to rqworker script. 13 years ago
Selwin Ong d1f586b413 Only configure logging handlers if not already present. 13 years ago
Ulrich Petri ba57f104ff Switched config file loading to import lib to allow dotted "paths" to settings modules 13 years ago
Jon Parise e90efc254b Use `redis.from_url()` for greater compatibility.
This lets us keep the redis-py version requirement back at 2.4.13.
13 years ago
Jon Parise eb00f69ced Add a standard --url argument to all scripts.
redis-py now supports URL-based connection configuration.  When --url
is specified, we use it to construct the Redis object.  Otherwise, we
use the existing argument-based construction method.

`Redis.from_url()` is new in redis-py 2.6.2, so that prerequisite has
been adjusted accordingly.
13 years ago
Alexander Saltanov 0e638d795b Don't show traceback in rqinfo when ^C is pressed. 13 years ago
Vincent Driessen c0df77f84d Support QUEUES as a config setting in settings files. 13 years ago
Vincent Driessen 81270c8e59 Support REDIS_PASSWORD setting in settings. 13 years ago
Scott Burns c705a2f06a Expose Redis password to scripts
Allow rqworker and rqinfo to connect to
password-protected Redis hosts.
13 years ago
Vincent Driessen a247c6eaa1 Merge branch 'master' into remove-logbook 13 years ago
Vincent Driessen 2f578a4c2d Avoid dict comprehension for compatibility.
This fixes #128.
13 years ago
Graeme Coupar 365d1d8226 Fixed argument handling in rqinfo
rqinfo was using None for the redis host and port, which was causing
exceptions when trying to connect.  It was possible to supply these on
the commandline, but port was just being passed straight through as a
string, which also caused exceptions.

This commit moves some of the argument & configuration file handling out
of rqworker and into the scripts/__init__.py file, and then calls it
from rqinfo.
13 years ago
Vincent Driessen 879a87d158 Remove logbook and replace it with logging.
This reverts commit 1ab8c19696 and
reintroduces all changes made by @dstufft.

Still, it needs more patches to reeanble the default log-to-console
behaviour.  See #121.
13 years ago
Vincent Driessen 1ab8c19696 Revert "Remove logbook and replace it with logging".
This reverts the commit range f367c38..978ba2d.

Issue #121 is currently blocking the 0.3.1 release.
13 years ago
Vincent Driessen a6e57dd7c0 Fix: change import path before importing settings module. 13 years ago
Vincent Driessen ce1da3f5ca Add support for configuration RQ workers with Sentry with a single flag.
This fixes #122.
13 years ago
Vincent Driessen 1687633c07 Add support for passing configuration files to rqworker.
This fixes #123.
13 years ago
Donald Stufft 58ccd337c0 Don't hardcode a name into logging.getLogger 13 years ago
Donald Stufft aeb17d0497 Make the rqworker script use the logging module instead of logbook 13 years ago
Jonas c99cab71cd Use a non-zero exitcode on errors in scripts
When a worker can't connect to Redis, return
a non-zero exit code so supervisor processes
can act accordingly.
13 years ago
Wichert Akkerman ec0e4776b4 Move common code out. 14 years ago
Wichert Akkerman 9f7d608da8 Renaming typo.. 14 years ago
Wichert Akkerman 2d4a58631d PyFlakes 14 years ago
Wichert Akkerman 97d2e4d784 Use console_scripts instead of scripts.
Unfortunately zc.buildout does not support distribute/setuptools script
option (see https://bugs.launchpad.net/zc.buildout/+bug/422724), but it
does support console_scripts. This also makes the scripts importable,
allowing for unittest and code reuse.
14 years ago