Uploaded image for project: 'Scheduler'
  1. Scheduler
  2. MGNLSCH-35

Contexts available to commands executed by CommandJob don't have access to the repository

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Critical
    • 1.5.x
    • 1.5.4
    • None

    Description

      When a command is executed via the scheduler, i.e by info.magnolia.module.scheduler.CommandJob, its context (passed to execute() or as MgnlContext.getInstance() don't have their repositoryStrategy set, resulting in an ugly NullPointerException.

      At the very least, this should not throw an NPE, but a more explicit exception. But I don't see there's a reason for this ? We can't have a user-specific context, but then why not pass the system context, rather than let developers believe they can use the given context, when really they can't ?
      (alternatively, if we had a "sudo" type of API, we could go as far as letting the scheduled job use the context of a specific configured user)

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                Unassigned Unassigned
                gjoseph Magnolia International
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Bug DoR
                    Task DoD