Toggle navigation
Toggle navigation
This project
Loading...
Sign in
서승완
/
kappa
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
Mitch Garnaat
2015-03-24 07:48:23 -0700
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
cecd99a9860a7c238249f84256e198a7af04f7bf
cecd99a9
2 parents
e0a67d58
5ade971e
Merge branch 'develop' of github.com:garnaat/kappa
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
bin/kappa
kappa/stack.py
bin/kappa
View file @
cecd99a
...
...
@@ -11,6 +11,7 @@
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
from
datetime
import
datetime
import
logging
import
click
...
...
@@ -56,7 +57,9 @@ def test(ctx):
def
tail
(
ctx
):
context
=
Context
(
ctx
.
obj
[
'config'
],
ctx
.
obj
[
'debug'
])
click
.
echo
(
'tailing logs...'
)
context
.
tail
()
for
e
in
context
.
tail
()[
-
10
:]:
ts
=
datetime
.
utcfromtimestamp
(
e
[
'timestamp'
]
//
1000
)
.
isoformat
()
click
.
echo
(
"{}: {}"
.
format
(
ts
,
e
[
'message'
]))
click
.
echo
(
'...done'
)
@cli.command
()
...
...
kappa/stack.py
View file @
cecd99a
...
...
@@ -22,7 +22,7 @@ LOG = logging.getLogger(__name__)
class
Stack
(
object
):
completed_states
=
(
'CREATE_COMPLETE'
,
'UPDATE_COMPLETE'
)
failed_states
=
(
'
ROLLBACK_COMPLETE'
,
)
failed_states
=
(
'
UPDATE_ROLLBACK_COMPLETE'
,
'ROLLBACK_COMPLETE'
)
def
__init__
(
self
,
context
,
config
):
self
.
_context
=
context
...
...
Please
register
or
login
to post a comment