Description Usage Arguments Details of the implementation
If there is a message that it READY
, it returns that. Otherwise it
checks for crashed workers.
1 | db_try_consume(db, queue, crashed = TRUE, con = NULL)
|
db |
DB file name. |
queue |
Name of the queue. |
The database must be locked for the whole operation, including checking on or creating the lock databases.
If there is a READY
message, that one is taken.
Otherwise if there are WORKING
messages, then
we check them one by one. This might take a lot of
time, and the DB must be locked for the whole search,
so it is not ideal. But I don't have a better solution
right now.
Taking a message means
Updating its row.status to WORKING
.
Creating another database that serves as the lock for this message.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.