This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
commit 9e7e48927c88dd6d15e048b9dca9a5726901fc37
tree 2ccbad8b8a162e9255c8371090d4a89dbe56ece7
parent f479ebbfd2bb68950a5e03f756726c94700607f2
tree 2ccbad8b8a162e9255c8371090d4a89dbe56ece7
parent f479ebbfd2bb68950a5e03f756726c94700607f2
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Sun Apr 27 11:39:14 -0700 2008 | [dustin] |
| |
Emakefile | Sun Apr 27 11:39:14 -0700 2008 | [dustin] |
| |
Makefile | Sun Apr 27 11:39:14 -0700 2008 | [dustin] |
| |
README.txt | Sun Apr 27 03:00:11 -0700 2008 | [tim] |
| |
src/ | Sun May 04 03:00:44 -0700 2008 | [tim] |
README.txt
================ Erlang-Beanstalk ================ What is this? ------------- An Erlang module that wraps the beanstalkd protocol. What is beanstalkd? ------------------- A fast, distributed, in-memory workqueue service. See http://xph.us/software/beanstalkd/ for more information, and links to clients in other languages. How do I use it? ---------------- First, make sure both of the modules are compiled, and that you have an instance of beanstalkd running in the background. Then you can connect to it like so (using whatever host and port values are appropriate for you): {ok, Socket} = beanstalk:connect(_Host="0.0.0.0", _Port=3000). At the moment this is just a direct call to gen_tcp:connect/3. Jobs are manipulated using the beanstalk_job module. To create a new job, pass a string or a binary to beanstalk_job:new/1: Job = beanstalk_job:new("hello"). You can alter the defaults using beanstalk_job:with/3, e.g., DelayedJob = beanstalk_job:with(delay, 30, Job). All the functions in the beanstalk module (apart from connect/2) correspond to calls in the beanstalkd protocol. Each expects to be given the socket connection as the last argument. For example: {inserted, JobID} = beanstalk:put(Job, Socket). {reserved, Job} = beanstalk:reserve(Socket). deleted = beanstalk:delete(JobID, Socket). And so on. WTF? ---- Found a bug? Think I could have done something better? Don't let it trouble you :) Let me know!




