clever-tools icon indicating copy to clipboard operation
clever-tools copied to clipboard

Support `timeout` option for the deploy command

Open aurrelhebert opened this issue 1 year ago • 0 comments

Support a timeout option for the deployed command as discussed in #309

We should first agreed on a duration format that we will support on the CLI (as seen in #609).

Timeout

First, a timeout option will be implemented.

Behavior

This option will add the following behavior:

  • If deploy is OK or FAIL before the timeout set, the CLI answer success or fail
  • If deploy is still in WIP when the timeout ends, the CLI answer fail

Option format

The timeout option will support value as:

  • An integer or a float number value (yet to define)
  • Could have an optional suffix (CLI will support m for minutes or s for seconds), by default the timeout will be in seconds

Example:

clever deploy my_app --timeout 5m
clever restart my_app --timeout 5m

# Timeout of 300 seconds
clever deploy my_app --timeout 300
clever restart my_app --timeout 20s

aurrelhebert avatar Feb 22 '24 10:02 aurrelhebert