Skip to contents

Returns the ids of workers known to have exited

Usage

rrq_worker_list_exited(controller = NULL)

Arguments

controller

The controller to use. If not given (or NULL) we'll use the controller registered with rrq_default_controller_set().

Value

A character vector of worker names

Examples

obj <- rrq_controller("rrq:example")

# At this point you might have an exited worker, depending on
# which examples have been run so far!
rrq_worker_list_exited(controller = obj)
#> character(0)

# Spawn a new worker so that we can stop it:
w <- rrq_worker_spawn(1, controller = obj)$id
#>  Spawning 1 worker with prefix 'unlegislative_borzoi'
w$id
#> Error in w$id: $ operator is invalid for atomic vectors
# Stop this worker and see that it appears in the list of exited
# workers:
rrq_worker_stop(w$id, controller = obj)
#> Error in w$id: $ operator is invalid for atomic vectors
rrq_worker_list_exited(controller = obj)
#> character(0)

# We can delete this exited worker:
rrq_worker_delete_exited(w$id, controller = obj)
#> Error in w$id: $ operator is invalid for atomic vectors

# After this, it is no longer listed as exited:
rrq_worker_list_exited(controller = obj)
#> character(0)