Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isJob() returns false for Workbench Jobs #287

Open
jthomasmock opened this issue Sep 28, 2023 · 1 comment
Open

isJob() returns false for Workbench Jobs #287

jthomasmock opened this issue Sep 28, 2023 · 1 comment

Comments

@jthomasmock
Copy link

In Workbench, as far as I can tell with my testing, isJob() returns TRUE only when used as Background Job and return FALSE when executed in a Workbench Job.

Could we modify the check so that it also returns TRUE when called from within a Workbench Job?

One example was a customer asking for how to have different behavior when run in dev (local interactive session) and use different data for example when run in a Workbench Job in a much lager scaled session.

@jgutman
Copy link
Contributor

jgutman commented Oct 31, 2023

Note that the rstudioapi functions beginning with launcher (e.g. launcherGetJobs launcherGetJob launcherControlJob) actually refer to Workbench jobs -- we updated this in the rstudioapi documentation for these functions, but we didn't add aliases to call them workbench jobs. Most of those functions depend on knowing the workbench job ID, but there's probably a way to check this from within the workbench job without knowing the actual job ID (and in any case rstudioapi::launcher_* functions are mostly inaccessible from within a workbench job, since those jobs are not actually running in an RStudio session)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants