Thread
#prefect-community
    Brad

    Brad

    2 years ago
    Hi team - I have some tasks that use the
    slack_notifier
    state handler (via the task kwarg), but I’d like to do some local testing without trigger the handler. Is there a
    context
    or
    set_temp_config
    I could use to mute it ?
    Chris White

    Chris White

    2 years ago
    Hey @Brad - we don’t expose a first class hook for muting this right now but it’s a good idea. Introducing a config option for muting all state handlers would be quite easy; whether we allow for task-by-task or handler-by-handler muting might warrant a larger discussion but either way if you’d like to open an issue for this we can look into it! In the meantime it might be simplest to override your task’s state handlers
    task.state_handlers = []
    for temporary testing purposes
    Brad

    Brad

    2 years ago
    Thanks @Chris White yeah that sounds reasonable. Although thinking about this a little more - possibly a better solution in this scenario would be having the slack handler gracefully handle having a
    None
    webhook url, and setting up a proper development config