Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ale
disque
Commits
55717488
Commit
55717488
authored
Mar 27, 2016
by
ale
Browse files
add support for the WORKING command
parent
e06542e4
Changes
1
Show whitespace changes
Inline
Side-by-side
disque.go
View file @
55717488
...
@@ -227,6 +227,17 @@ func (pool *Pool) Nack(job *Job) error {
...
@@ -227,6 +227,17 @@ func (pool *Pool) Nack(job *Job) error {
return
nil
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.
// Wait blocks until the given job is ACKed.
// Native WAITJOB discussed upstream at https://github.com/antirez/disque/issues/168.
// Native WAITJOB discussed upstream at https://github.com/antirez/disque/issues/168.
func
(
pool
*
Pool
)
Wait
(
job
*
Job
)
error
{
func
(
pool
*
Pool
)
Wait
(
job
*
Job
)
error
{
...
...
Write
Preview
Supports
Markdown
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