How to find out which collection a task was called from? #939
dannyadair
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Can I find out inside the task call which collection the task was accessed from?
Or do I have to dissect sys.argv?
It seems there is a disconnect, how can I get from a Task to "its" Call or Executor?
Thanks for any pointers!
Background: I'd like to introduce constraints, e.g. every task in the "dev" collection tree can only be called if the current environment is a dev environment. Doing this with a custom task decorator means I have to define per-task and also can't add/import tasks without retro-fitting the correct constraint.
Beta Was this translation helpful? Give feedback.
All reactions