Skip to content
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

FR: Add a FinalScripts section which will run after all other items #65

Open
BigMacAdmin opened this issue Oct 3, 2024 · 4 comments
Open

Comments

@BigMacAdmin
Copy link
Collaborator

Intended to be used for Webhooks to report Baseline status, or other "absolulte final cleanup" type tasks.

These will run immediately before the "DialogFailWindow" or "DialogSuccessWindow" time period, so the documentation should imply that they need to be very quick to run.

@keepfacesbeard
Copy link

Are you thinking this will leverage the process_scripts function, and reference a new key in the config profile? Running right after: dialog_command "quit:"

@BigMacAdmin
Copy link
Collaborator Author

Yes, the same process_scripts function would be used, no need to rewrite any of it I don't think.

I think it needs to fire off prior to dialog_command quit: that way it doesn't cause a delay between the primary window and the success/fail window.

If you're considering a PR, please review this page :) thanks.

@BigMacAdmin
Copy link
Collaborator Author

@keepfacesbeard What do you think about having two separate sections, one that runs if all items were successful and one that runs if there were failures?

To help people keep chatter down in case they only want to know about failed items, etc.

Thoughts?

@keepfacesbeard
Copy link

keepfacesbeard commented Oct 15, 2024

So two separate function calls, like if[success]; process_scripts 'FinalScriptsSuccess', elif[failure]; process_scripts 'FinalScriptsFailure', dependent on whether or not there's a failure of any kind?
Failures in scripts/packages is basically the kind of reporting I am trying to do in my FinalScript webhook script, but I figured any logic like that could be built into the script itself. Some folks might want specific things to get called out, script failures, logs, etc., or send to different places depending on failure mode. I'm not sure about the added fail/success separation. No strong opinion, I suppose. Some people might find it useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants