Showing
2 changed files
with
5 additions
and
2 deletions
... | @@ -11,6 +11,7 @@ | ... | @@ -11,6 +11,7 @@ |
11 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF | 11 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF |
12 | # ANY KIND, either express or implied. See the License for the specific | 12 | # ANY KIND, either express or implied. See the License for the specific |
13 | # language governing permissions and limitations under the License. | 13 | # language governing permissions and limitations under the License. |
14 | +from datetime import datetime | ||
14 | import logging | 15 | import logging |
15 | 16 | ||
16 | import click | 17 | import click |
... | @@ -56,7 +57,9 @@ def test(ctx): | ... | @@ -56,7 +57,9 @@ def test(ctx): |
56 | def tail(ctx): | 57 | def tail(ctx): |
57 | context = Context(ctx.obj['config'], ctx.obj['debug']) | 58 | context = Context(ctx.obj['config'], ctx.obj['debug']) |
58 | click.echo('tailing logs...') | 59 | click.echo('tailing logs...') |
59 | - context.tail() | 60 | + for e in context.tail()[-10:]: |
61 | + ts = datetime.utcfromtimestamp(e['timestamp']//1000).isoformat() | ||
62 | + click.echo("{}: {}".format(ts, e['message'])) | ||
60 | click.echo('...done') | 63 | click.echo('...done') |
61 | 64 | ||
62 | @cli.command() | 65 | @cli.command() | ... | ... |
... | @@ -22,7 +22,7 @@ LOG = logging.getLogger(__name__) | ... | @@ -22,7 +22,7 @@ LOG = logging.getLogger(__name__) |
22 | class Stack(object): | 22 | class Stack(object): |
23 | 23 | ||
24 | completed_states = ('CREATE_COMPLETE', 'UPDATE_COMPLETE') | 24 | completed_states = ('CREATE_COMPLETE', 'UPDATE_COMPLETE') |
25 | - failed_states = ('ROLLBACK_COMPLETE',) | 25 | + failed_states = ('UPDATE_ROLLBACK_COMPLETE', 'ROLLBACK_COMPLETE') |
26 | 26 | ||
27 | def __init__(self, context, config): | 27 | def __init__(self, context, config): |
28 | self._context = context | 28 | self._context = context | ... | ... |
-
Please register or login to post a comment