You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2019/03/28 15:20:49 UTC
[GitHub] [incubator-openwhisk] dhongyt opened a new issue #4410: Python
time.sleep Error Return
dhongyt opened a new issue #4410: Python time.sleep Error Return
URL: https://github.com/apache/incubator-openwhisk/issues/4410
## Environment details:
* ***Serverless Framework Version you're using***:
Node 6.16.0
Serverless 1.39.1
* ***Operating System***:
CentOS 7.6
## Steps to reproduce the issue:
* What went wrong?
Running serverless function in python that include code to sleep for 60 seconds `time.sleep(60)` and then call the OpenWhisk API to run the code again, depending on the status change, it will either wait another 60 seconds or move on to complete the task.
sls CLI should return the python dictionary that I have passed to it
* What was the config you used?
```
resizeosvolume:
handler: lib/volumes.resizeInstance
name: resizeosvolume
memory: 512
timeout: 80
events:
- trigger: resizeos
image: ebsautoscale:1.0
```
Invoking the function by:
`sls invoke -f resizeosvolume --path testosvolume.json`
* What stacktrace or error message from your provider did you see?
```
TypeError: Cannot read property 'success' of undefined
at OpenWhiskInvoke.log (/home/dtrang/aws-volume-autoscaling/node_modules/serverless-openwhisk/invoke/index.js:150:55)
From previous event:
at PluginManager.invoke (/usr/lib/node_modules/serverless/lib/classes/PluginManager.js:408:22)
at PluginManager.run (/usr/lib/node_modules/serverless/lib/classes/PluginManager.js:439:17)
at variables.populateService.then (/usr/lib/node_modules/serverless/lib/Serverless.js:106:33)
at runCallback (timers.js:672:20)
at tryOnImmediate (timers.js:645:5)
at processImmediate [as _immediateCallback] (timers.js:617:5)
From previous event:
at Serverless.run (/usr/lib/node_modules/serverless/lib/Serverless.js:93:6)
at serverless.init.then (/usr/lib/node_modules/serverless/bin/serverless:43:28)
at /usr/lib/node_modules/serverless/node_modules/graceful-fs/graceful-fs.js:111:16
at /usr/lib/node_modules/serverless/node_modules/graceful-fs/graceful-fs.js:45:10
at FSReqWrap.oncomplete (fs.js:123:15)
From previous event:
at initializeErrorReporter.then (/usr/lib/node_modules/serverless/bin/serverless:43:6)
at runCallback (timers.js:672:20)
at tryOnImmediate (timers.js:645:5)
at processImmediate [as _immediateCallback] (timers.js:617:5)
From previous event:
at __dirname (/usr/lib/node_modules/serverless/bin/serverless:28:46)
at Object.<anonymous> (/usr/lib/node_modules/serverless/bin/serverless:67:4)
at Module._compile (module.js:577:32)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.runMain (module.js:611:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:160:9)
at bootstrap_node.js:507:3
```
```
Cannot read property 'success' of undefined
For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
```
## Provide the expected results and outputs:
* What did you expect should have happened?
`{"status": "OK"}`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services