mrc-ide / queuer

:walking::walking::walking: Prototype general queue
https://mrc-ide.github.io/queuer
Other
4 stars 1 forks source link

enqueue throws error trying to pass function name from package as an argument #13

Closed jeffeaton closed 7 years ago

jeffeaton commented 7 years ago

Example function call:

mw.rtrend <- mrcq$enqueue(fitmod(mw, ageprev=TRUE, sibmx=FALSE, fitincrr=TRUE, pregprev=TRUE, eppmod="rtrend", B0=1e4, B=1e3, number_k=1000, D=4, opt_iter=5, sample.prior=eppspectrum::sample.prior, prior=eppspectrum::prior, likelihood=eppspectrum::likelihood))

Error in get(i, envir, inherits = FALSE) : object 'eppspectrum' not found`

richfitz commented 7 years ago

MWE:

  path <- tempfile("queuer_")
  ctx <- context::context_save(path, storage_type = "environment")
  obj <- queue_base(ctx)
  x <- 1
  t <- obj$enqueue(foo(x, ids::random_id))
richfitz commented 7 years ago

Still an issue with:

t <- obj$enqueue(foo(x, ids::random_id$baz))