Returns the last (few) elements in the worker log, in a programmatically useful format (see Value).
Source:R/rrq_workers.R
rrq_worker_log_tail.Rd
Returns the last (few) elements in the worker log, in a programmatically useful format (see Value).
Arguments
- worker_ids
Optional vector of worker ids. If
NULL
then all active workers are used.- n
Number of elements to select, the default being the single last entry. Use
Inf
or0
to indicate that you want all log entries- controller
The controller to use. If not given (or
NULL
) we'll use the controller registered withrrq_default_controller_set()
.
Value
A data.frame with columns:
worker_id
: the worker idchild
: the process id, an integer, where logs come from a child process from a task queued withseparate_process = TRUE
time
: the time from Redis when the event happened; see redux::redis_time to convert this to an R timecommand
: the command sent from or to the workermessage
: the message corresponding to that command
Examples
obj <- rrq_controller("rrq:example")
rrq_worker_log_tail(n = 10, controller = obj)
#> worker_id child time command
#> 1 exhaustible_umbrette NA 1726673816 TASK_ERROR
#> 2 exhaustible_umbrette NA 1726673817 MESSAGE
#> 3 exhaustible_umbrette NA 1726673817 ENVIR
#> 4 exhaustible_umbrette NA 1726673817 ENVIR
#> 5 exhaustible_umbrette NA 1726673817 RESPONSE
#> 6 exhaustible_umbrette NA 1726673817 TASK_START
#> 7 exhaustible_umbrette NA 1726673817 TASK_COMPLETE
#> 8 exhaustible_umbrette NA 1726673817 MESSAGE
#> 9 exhaustible_umbrette NA 1726673817 ENVIR
#> 10 exhaustible_umbrette NA 1726673817 RESPONSE
#> 11 unlegislative_borzoi_1 NA 1726673818 ALIVE
#> 12 unlegislative_borzoi_1 NA 1726673818 ENVIR
#> 13 unlegislative_borzoi_1 NA 1726673818 QUEUE
#> message
#> 1 5fdc84439b0b553fc93569320d068e7a
#> 2 REFRESH
#> 3 new
#> 4 create
#> 5 REFRESH
#> 6 50ec25e92c8e338c96e78f4138fe7e75
#> 7 50ec25e92c8e338c96e78f4138fe7e75
#> 8 REFRESH
#> 9 new
#> 10 REFRESH
#> 11
#> 12 new
#> 13 default