Last active
June 27, 2018 04:34
-
-
Save JiniousChoi/56902ae953ea2daaaa0c628417ecffd7 to your computer and use it in GitHub Desktop.
a question for feeds (especially for custom event provider)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// identity.py | |
def main(args): | |
print(args) | |
return { 'args' : args } | |
$ wsk package create feedtest --shared=yes | |
ok: created package feedtest | |
$ wsk action create feedtest/identity identity.py --kind python:3 | |
ok: created action feedtest/identity | |
$ wsk trigger create T_id --feed feedtest/identity | |
ok: invoked /_/feedtest/identity with id f962b8694daf4f01a2b8694daf1f019a | |
{ | |
"activationId": "f962b8694daf4f01a2b8694daf1f019a", | |
"annotations": [ | |
{ | |
"key": "path", | |
"value": "jin.c/feedtest/identity" | |
}, | |
{ | |
"key": "waitTime", | |
"value": 766 | |
}, | |
{ | |
"key": "kind", | |
"value": "python:3" | |
}, | |
{ | |
"key": "limits", | |
"value": { | |
"logs": 10, | |
"memory": 256, | |
"timeout": 60000 | |
} | |
}, | |
{ | |
"key": "initTime", | |
"value": 404 | |
} | |
], | |
"duration": 406, | |
"end": 1530072881286, | |
"logs": [], | |
"name": "identity", | |
"namespace": "jin.c", | |
"publish": false, | |
"response": { | |
"result": { | |
"args": { | |
"authKey": "2b5160f8-a124-4fab-b22a-9620e9c7462e:oCvRZRDZMzb4l1bkSQ9LCxW0WkCJitXox9IN3zFfjjlA1TnpGfvYjtN02ioAEZav", | |
"lifecycleEvent": "CREATE", | |
"triggerName": "/_/T_id" | |
} | |
}, | |
"status": "success", | |
"success": true | |
}, | |
"start": 1530072880880, | |
"subject": "jin.c:jin.c", | |
"version": "0.0.1" | |
} | |
ok: created trigger T_id | |
$ wsk list | |
Entities in namespace: default | |
packages | |
/jin.c/feedtest shared | |
actions | |
/jin.c/feedtest/identity private python:3 | |
triggers | |
/jin.c/T_id private | |
// when T_id is fired no activation id is produced. | |
$ wsk trigger fire T_id | |
ok: triggered /_/T_id with id | |
// No activation id is produced by firing T_id trigger, either. | |
$ curl -X POST -H "Content-Type: application/json" https://2b5160f8-a124-4fab-b22a-9620e9c7462e:oCvRZRDZMzb4l1bkSQ9LCxW0WkCJitXox9IN3zFfjjlA1TnpGfvYjtN02ioAEZav@frisb.kakao.com/api/v1/namespaces/_/triggers/T_id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment