Skip to content

Scheduler job execution does not respect LOCO_CONFIG_DIR #1372

Closed
@mccormickt

Description

@mccormickt

Description

When running with args start --all, the scheduler executions fail with a No such file or directory error. This seems due to the fact that the scheduler executions pass in environment variables to a shell command to run it and does not include the recently added LOCO_CONFIG_FOLDER variable:

duct_sh::sh_dangerous(&self.command).env("LOCO_ENV", self.environment.to_string());

To Reproduce

Move the loco config directory into some path that isn't ./config and set LOCO_CONFIG_FOLDER to that path and run the scheduler. You will get an error log similar to:
failed to execute scheduler job in sub process error: No such file or directory (os error 2)

Expected Behavior

The scheduler should respect Loco's standard environment variables like it does with LOCO_ENV.

Environment:
Containerized Loco app containing only the compiled binary and the proper environment's config, copied to /opt/ and pointed to using with LOCO_CONFIG_FOLDER.

Additional Context
N/A

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