Skip to content

Commit

Permalink
fix readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladislav Grubov committed Jul 20, 2024
1 parent 48f1cd2 commit f3699a5
Showing 1 changed file with 24 additions and 14 deletions.
38 changes: 24 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
### TODO
# xQueue

* reload/upgrade and feature switch
* composite primary keys
* switch - turn non-taken task into any state
* snatch - take away Taken task from its owner and turn it into R/W
* restart (renew, requeue?) - take task from W/D/Z states and put it into R/W
* it seems, that ttl/ttr/bury requires attrs field
[![Coverage Status](https://coveralls.io/repos/github/moonlibs/xqueue/badge.svg?branch=master)](https://coveralls.io/github/moonlibs/xqueue?branch=master)

Add power of the Queue into Tarantool Space

Latest Release: 5.0.0
Backward compatibility rockspec: rockspecs/xqueue-scm-5.rockspec
Always latest rockspec: rockspecs/xqueue-dev-1.rockspec

# Status
## Status

* **R** - ready - task is ready to be taken
* created by put without delay
Expand All @@ -33,9 +34,9 @@
* **D** - done - task was processed and ack'ed and **permanently** left in database
* enabled when keep feature is set

# Interface
## Interface

## Creator methods
### Creator methods

* `.upgrade(space, options)`

Expand Down Expand Up @@ -83,7 +84,7 @@ M.upgrade(space, {
})
```

## Producer methods
### Producer methods

* `space:put`
* `task` - table or array or tuple
Expand Down Expand Up @@ -111,7 +112,7 @@ box.space.myqueue:put({ name="xxx"; data="yyy"; }, { delay = 1.5 })
box.space.myqueue:put({ name="xxx"; data="yyy"; }, { delay = 1.5; ttl = 100 })
```

## Consumer methods
### Consumer methods

* `space:take(timeout)`
* `timeout` - number of seconds to wait for new task
Expand Down Expand Up @@ -151,7 +152,7 @@ box.space.myqueue:put({ name="xxx"; data="yyy"; }, { delay = 1.5; ttl = 100 })
* `timeout` - number of seconds to wait for the task processing
* returns task tuple or table (see retval) and boolean `was_processed` flag

## Admin methods
### Admin methods

* `space:dig(id, [attr])` - dig out task from buried state
* `id` - as in `:ack`
Expand Down Expand Up @@ -203,7 +204,7 @@ box.space.myqueue:put({ name="xxx"; data="yyy"; }, { delay = 1.5; ttl = 100 })
...
```

## Explanation of Statuses
## Explanation of Statuses in :stats()

| Status | Description |
|--------|-----------------------------------------------------------------------------|
Expand Down Expand Up @@ -234,3 +235,12 @@ box.space.myqueue:put({ name="xxx"; data="yyy"; }, { delay = 1.5; ttl = 100 })
| S -> W | Task was moved from another tube to be Waiting |
| S -> D | Task was moved from another tube to be Done |
| S -> B | Task was moved from another tube to be Buried |

## TODO

* reload/upgrade and feature switch
* composite primary keys
* switch - turn non-taken task into any state
* snatch - take away Taken task from its owner and turn it into R/W
* restart (renew, requeue?) - take task from W/D/Z states and put it into R/W
* it seems, that ttl/ttr/bury requires attrs field

0 comments on commit f3699a5

Please sign in to comment.