Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
ale
disque
Commits
55717488
Commit
55717488
authored
Mar 27, 2016
by
ale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add support for the WORKING command
parent
e06542e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
disque.go
disque.go
+11
-0
No files found.
disque.go
View file @
55717488
...
...
@@ -227,6 +227,17 @@ func (pool *Pool) Nack(job *Job) error {
return
nil
}
// Working on a job.
func
(
pool
*
Pool
)
Working
(
job
*
Job
)
error
{
sess
:=
pool
.
redis
.
Get
()
defer
sess
.
Close
()
if
_
,
err
:=
sess
.
Do
(
"WORKING"
,
job
.
ID
);
err
!=
nil
{
return
err
}
return
nil
}
// Wait blocks until the given job is ACKed.
// Native WAITJOB discussed upstream at https://github.com/antirez/disque/issues/168.
func
(
pool
*
Pool
)
Wait
(
job
*
Job
)
error
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment