Hi,
Is it possible to create indico shell scripts? We’ve been asked to implement account management so that any stale accounts are first blocked and later deleted (or at least anonymized).
I can do this interactively with indico shell, but it would work better if I could create a script that could then be run periodically.
Or is this functionality already in indico?
Thanks,
Chris
Best to make it a plugin. That way you can use the indico task scheduler etc.
Alternatively, if you just want a small script, you can just wrap it like this:
from indico.core.db import db
from indico.web.flask.app import make_app
def main():
# your code here
db.session.commit()
if __name__ == '__main__':
with make_app().app_context():
main()
Thanks. And thanks for responding so quickly.
Chris