Clear some fields from Cron workers
What does this MR do?
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.
gitlab-com/gl-infra/scalability#111 (closed)
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry
- [-] Documentation (if required) Developer docs will be part of gitlab-com/gl-infra/scalability#113 (closed)
- [-] Code review guidelines
- [-] Merge request performance guidelines
- [-] Style guides
- [-] Database guides
- [-] Separation of EE specific content
Availability and Testing
Edited by Bob Van Landuyt