Skip to content

Commit

Permalink
Merge pull request #15 from jgeiger/patch-1
Browse files Browse the repository at this point in the history
Fix spelling issues in README.md
  • Loading branch information
lantins committed Dec 14, 2012
2 parents 62cc2b8 + c3f9f25 commit 8430d35
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions README.md
Expand Up @@ -7,8 +7,8 @@ resque-lock-timeout adds locking, with optional timeout/deadlock handling to
resque jobs.

Using a `lock_timeout` allows you to re-acquire the lock should your worker
fail, crash, or is otherwise unable to relase the lock. **i.e.** Your server
unexpectedly looses power. Very handy for jobs that are recurring or may be
fail, crash, or is otherwise unable to release the lock. **i.e.** Your server
unexpectedly loses power. Very handy for jobs that are recurring or may be
retried.

Usage / Examples
Expand All @@ -27,15 +27,15 @@ Usage / Examples
end
end

Locking is achieved by storing a identifyer/lock key in Redis.
Locking is achieved by storing a identifier/lock key in Redis.

Default behaviour...
Default behavior...

* Only one instance of a job may execute at once.
* The lock is held until the job completes or fails.
* If another job is executing with the same arguments the job will abort.

Please see below for more information about the identifer/lock key.
Please see below for more information about the identifier/lock key.

### Enqueued Exclusivity (Loner Option)

Expand Down Expand Up @@ -64,15 +64,15 @@ Simply set the lock timeout in seconds, e.g.
extend Resque::Plugins::LockTimeout
@queue = :network_graph

# Lock may be held for upto an hour.
# Lock may be held for up to an hour.
@lock_timeout = 3600

def self.perform(repo_id)
heavy_lifting
end
end

Customise & Extend
Customize & Extend
==================

### Job Identifier/Lock Key
Expand Down Expand Up @@ -171,7 +171,7 @@ Several callbacks are available to override and implement your own logic, e.g.
extend Resque::Plugins::Lock
@queue = :network_graph

# Lock may be held for upto an hour.
# Lock may be held for up to an hour.
@lock_timeout = 3600

# No same job get enqueued if one already running/enqueued
Expand All @@ -187,7 +187,7 @@ Several callbacks are available to override and implement your own logic, e.g.
raise EnqueueFailed
end

# Job has complete; but the lock expired before we could relase it.
# Job has complete; but the lock expired before we could release it.
# The lock wasn't released; as its *possible* the lock is now held
# by another job.
def self.lock_expired_before_release(repo_id)
Expand All @@ -214,4 +214,4 @@ And a little tinkering from Luke Antins.
[rq]: http://github.com/defunkt/resque
[redis-setnx]: http://code.google.com/p/redis/wiki/SetnxCommand
[resque-lock]: http://github.com/defunkt/resque-lock
[resque-lock-retry]: http://github.com/rcarver/resque-lock-retry
[resque-lock-retry]: http://github.com/rcarver/resque-lock-retry

0 comments on commit 8430d35

Please sign in to comment.