New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support custom actions to be triggered #44

Closed
HonzaKral opened this Issue Feb 12, 2014 · 1 comment

Comments

Projects
None yet
2 participants
@HonzaKral
Copy link
Member

HonzaKral commented Feb 12, 2014

I'd like to see the ability for users to register their own actions to be run at given thresholds. Example API (rough draft):

@curator.action('close')
def close_index(client, index_name):
    client.indices.close(index=index_name)

Which can then be used via the CLI by specifying the 'close' action type.

Problem is how do we do the discovery - we could ask the users to wrap the code in their at this point:

#!/usr/bin/env python
import curator
# ... actions here
if __name__ == '__main__':
    curator.main()

or maybe just provide an env variable with a list of python modules to be loaded before the run:

CURATOR_ACTIONS='myapp.curator_actions' curator.py -....

This way curator itself wouldn't have to support all the options people might wish to run but will instead focus on selecting the indices for those actions and dispatching the calls to those actions.

@untergeek

This comment has been minimized.

Copy link
Member

untergeek commented Sep 25, 2014

I believe this is now addressed with the API/script split in #159.

If not, we can re-open it and discuss for future releases.

@untergeek untergeek closed this Sep 25, 2014

@HonzaKral HonzaKral removed their assignment Mar 10, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment