Skip to content

isJob() returns false for Workbench Jobs #287

Open

Description

@jthomasmock

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.

Activity

  1. jgutman commented on Oct 31, 2023

    @jgutman
    Contributor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions