• Bob Van Landuyt's avatar
    Clear some fields from Cron workers · c310003d
    Bob Van Landuyt authored
    Cron workers, regardless from how they are schedules, can't have a
    context pointing to a user, project or a namespace. Since they don't
    run with arguments, they are never scoped to a single resource.
    
    So clear the context, to make sure that every job that gets scheduled
    from within a cron worker doesn't inherit it's context.
    
    This also adds a `with_context` helper to the workers to facilitate
    scheduling a context for workers that are spun off from a cron worker.
    c310003d
base_controller.rb 1.62 KB