Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Identify and record the main process #292

@wlandau

Description

@wlandau

Prework

  • Read and agree to the code of conduct and contributing guidelines.
  • If there is already a relevant issue, whether open or closed, comment on the existing thread instead of posting a new issue.
  • New features take time and effort to create, and they take even more effort to maintain. So if the purpose of the feature is to resolve a struggle you are encountering personally, please consider first posting a "trouble" or "other" issue so we can discuss your use case and search for existing solutions first.
  • Format your code according to the tidyverse style guide.

Proposal

  1. Record the host and PID of the callr process that runs the pipeline. Store that info in _targets/meta/process .
  2. Support a new tar_process() function to retrieve this info. For Compatibility with Shiny #291, let's also throw in tar_pid() just to get the PID.
  3. If a new process tries to run the pipeline and the old process is still alive, throw an informative error recommending to terminate the original pipeline or wait until it finishes.

(3) is not perfect, but it is good enough for #291. Following @mattwarkentin's idea from #273, we might even add a little note in tar_watch() because we can be honest that we may not necessarily be able to check if the main process is alive.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions