1724 Commits (0ba3971d55824e79af66d9e033811cee49de4ef5)
 

Author SHA1 Message Date
Vincent Driessen 83525c42c7 Prevent against 'created_at' field being None. 12 years ago
Vincent Driessen 7d37c257ae Prepare for 0.3.6. 12 years ago
Vincent Driessen cd2a759be8 Add release date. 12 years ago
Vincent Driessen c427eda36c Bump version to 0.3.5. 12 years ago
Vincent Driessen 54254f2271 Patch the connection instances.
This patches the connection object (which is either a StrictRedis
instance or a Redis instance), to have alternative class methods that
behave exactly like their StrictRedis counterparts, no matter whether
which type the object is.  Only the ambiguous methods are patched.  The
exhaustive list:

- _zadd          (fixes argument order)
- _lrem          (fixes argument order)
- _setex         (fixes argument order)
- _pipeline      (always returns a StrictPipeline)
- _ttl           (fixes return value)
- _pttl          (fixes return value)

This makes it possible to call the methods reliably without polluting
the RQ code any further.
12 years ago
Vincent Driessen 67880343f1 Make inner_exception optional, and use new except syntax. 12 years ago
Idan Kamara 2baa2e370f job: save the real exception when unpickling fails
We raise our own exception which hides the real error (often an ImportError),
making it difficult to see what happend. Instead, save the original exception
too.
12 years ago
Yaniv Aknin 4925b09aa5 Set worker ttl and maintain it when idle/taking/finishing jobs
This change could use far better test coverage, but I'm not sure how to
test it without refactoring more of the code than I think is reasonable
in the scope of this work.
12 years ago
Yaniv Aknin 74c2351232 Refactor dequeue_any to accept arbitrary timeouts
The 'blocking' parameter was replaced with a 'timeout' parameter.

The timeout parameter is interpreted thus:
    0 - no timeout (block forever, equivalent to blocking=True)
    None - non-blocking (return value or None immediately, equivalent to
                         blocking=False)
    <integer> - maximum seconds to block

Upon timing out, a dequeue operation will raise DequeueTimeout.
12 years ago
Vincent Driessen 0bc451f75b Install importlib on Travis' py26 environment. 12 years ago
Vincent Driessen 36eb555981 Update Travis CI config file to use py.test. 12 years ago
Vincent Driessen 73e6017896 Add tox tests, for Python 2.6 and PyPy. 12 years ago
Vincent Driessen 06b48c2026 Use unittest2 for Python 2.6. 12 years ago
Vincent Driessen cc14d6f00b Update changelog. 12 years ago
Vincent Driessen 743cf3cd74 Merge branch 'vierja-ended_time' 12 years ago
Vincent Driessen 20d435a077 Prepare for 0.3.5. 12 years ago
Vincent Driessen f818fb5d43 Bump version to 0.3.4. 12 years ago
Vincent Driessen c7e54d8c1a Promote to 'beta' stage.
This should've been done on 0.3.0 already, actually.
12 years ago
Vincent Driessen e1b81b1669 Avoid new-style classes under Python 2.6.
Little ugly fix, required because Python 2.6's logging uses old-style
classes.  Thanks for finding this one, @deferraz.
12 years ago
Vincent Driessen 77fb32791d Include a copy of dictConfig in RQ, for Python 2.6 compat. 12 years ago
Vincent Driessen e29981a008 Bump to new development version. 12 years ago
Vincent Driessen 55bb32cb36 Release 0.3.3. 12 years ago
Vincent Driessen d4f5bcb817 Fix position of changelog entry. 12 years ago
Vincent Driessen d1c2b3b78d Merge branch 'selwin-remove-logbook'
Conflicts:
	rq/utils.py
	rq/worker.py
	setup.cfg
	setup.py
12 years ago
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.
12 years ago
Vincent Driessen 90df03dc0b Add release notes. 12 years ago
Vincent Driessen 90b15fd0b6 Don't silently fail when unpickling.
When a pickled job string can't be unpickled because some required
module isn't loadable, this leads to an `UnpickleError` in the worker
(not in the horse).

Currently we just assume "garbage" in the job's data field, and silently
ignore it.

This is bad.

Really bad.

Because it avoids the normal exception handling mechanism that RQ has.

Historically, this "feature" was introduced to ignore any invalid pickle
data ("bad strings") on queues, and go on. However, we must assume data
inside `job.data` to be valid pickle data.

While an invalid _format_ of pickle data (e.g. the string "blablah"
isn't valid) leads to unpickle errors, unpickling errors will also occur
when the job can't be validly constructed in memory for other reasons,
like being unable to load a specific class.

Django is a good example of this: try submitting jobs that use
`django.conf.settings` while the `DJANGO_SETTINGS_MODULE` env var isn't
set. Currently, RQ workers will drop these jobs and dismiss them like
any non-valid pickle data. You won't be notified.

This patch changes RQ's behaviour to never ignore invalid string data on
any queue and _always_ handle these errors explicitly (but without
bringing the main loop down, of course).
12 years ago
Vincent Driessen 7216b1eedb Add .env.fish, for fish lovers. 12 years ago
Selwin Ong 40d0a7d9a9 Removed __main__ that was accidentally added to rqworker script. 12 years ago
Selwin Ong d1f586b413 Only configure logging handlers if not already present. 12 years ago
Javier Rey d660b611db ended_at time is now saved when job is finished 12 years ago
Selwin Ong f498de57b6 Always call job.save even on synchronous queues so get_current_job doesn't fail 12 years ago
Vincent Driessen 10237ddcb4 Merge branch 'job-access-within-job'
Conflicts:
	CHANGES.md
	rq/job.py
12 years ago
Vincent Driessen a543a3860f Merge pull request #154 from ulope/issue154
config file option doesn't work for dotted names
12 years ago
Ulrich Petri 43038d3150 Added tests for config file loading 12 years ago
Ulrich Petri ba57f104ff Switched config file loading to import lib to allow dotted "paths" to settings modules 12 years ago
Vincent Driessen 5fd85ec754 Merge pull request #149 from jparise/scripts-url-argument
Add a standard --url argument to all scripts.
12 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.
12 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.
12 years ago
Vincent Driessen b97a9df69c Merge pull request #146 from sashka/master
Make rqinfo.py more silent.
12 years ago
Alexander Saltanov 0e638d795b Don't show traceback in rqinfo when ^C is pressed. 12 years ago
Vincent Driessen d80fa53d7e Ugh. Syntax. 12 years ago
Vincent Driessen 11794ccef5 Merge branch 'sburns-no-colorize-notty' 12 years ago
Vincent Driessen 435cbc0f53 Simplify a bit. 12 years ago
Scott Burns 59a01b49f4 Don't colorize non-tty stdout/err 12 years ago
Vincent Driessen 0e825c98ca Remove procname dependency. 12 years ago
Vincent Driessen 9ff5b18ebb Merge branch 'sburns-decorator-ttl' 12 years ago
Vincent Driessen 4e6b19d5ab Bump version number. 12 years ago
Vincent Driessen 5e59c6e28e Rename the const. 12 years ago
Scott Burns 538bbb1b55 Decorator accepts result_ttl argument 12 years ago