You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
watch isn't reasonable to use with Bash functions since it invokes the given command as a subprocess. It would be good to emulate a subset of its features in Bash, however, so functions like wait_ext and wait_port could be more standard (and other gems could add other similar utils).
The text was updated successfully, but these errors were encountered:
Users can define functions in the polling:: namespace, like polling::port_listening, and functions in the notify:: namespace like notify::desktop or notify::email. These can then be composed arbitrarily, and helper wrappers like wait_for or email_once can simplify common use-cases. Bonus if the callback functions can be tab-completable.
Examples:
# Invoke notify::echo once polling::port_listening succeeds, indicating port 80 is up
$ util::watch echo port_listening 80
# Helper for blocking in the current shell (basically just wrapping `util::watch echo ...`)
$ wait_for url http://google.com
# Send an email once task is complete; doesn't block# wraps util::watch notify::email within a disown ... & subshell
$ email_once process_complete 1234
Original report by Michael Diamond (Bitbucket: dimo414).
watch
isn't reasonable to use with Bash functions since it invokes the given command as a subprocess. It would be good to emulate a subset of its features in Bash, however, so functions likewait_ext
andwait_port
could be more standard (and other gems could add other similar utils).The text was updated successfully, but these errors were encountered: