You know what method is being and you want to figure out how it got there. Raising an exception is a bit harsh since all you want is a stack trace
puts caller
Seriously. It's that easy. If you're getting too much information you could
| import jenkins.model.* | |
| def matchedJobs = Jenkins.instance.items.findAll { job -> | |
| job.name =~ /my_regex_here/ | |
| } | |
| matchedJobs.each { job -> | |
| println job.name | |
| //job.delete() | |
| } |
| console.log('Loading function'); | |
| const https = require('https'); | |
| const url = require('url'); | |
| // to get the slack hook url, go into slack admin and create a new "Incoming Webhook" integration | |
| const slack_url = 'https://hooks.slack.com/services/...'; | |
| const slack_req_opts = url.parse(slack_url); | |
| slack_req_opts.method = 'POST'; | |
| slack_req_opts.headers = {'Content-Type': 'application/json'}; |
| #-*- coding: utf-8 -*- | |
| # Python 3.4 | |
| # author: http://blog.dokenzy.com/ | |
| # date: 2015. 4. 8 | |
| # References | |
| # http://www.imcore.net/encrypt-decrypt-aes256-c-objective-ios-iphone-ipad-php-java-android-perl-javascript/ | |
| # http://stackoverflow.com/questions/12562021/aes-decryption-padding-with-pkcs5-python | |
| # http://stackoverflow.com/questions/12524994/encrypt-decrypt-using-pycrypto-aes-256 |
| #!/bin/bash | |
| set -euo pipefail | |
| function myFunction() { | |
| myCommand | |
| return $? | |
| } | |
| retry=0 | |
| maxRetries=5 |
You know what method is being and you want to figure out how it got there. Raising an exception is a bit harsh since all you want is a stack trace
puts caller
Seriously. It's that easy. If you're getting too much information you could
| #!/bin/bash | |
| TABLE_NAME=$1 | |
| # Get id list | |
| aws dynamodb scan --table-name $TABLE_NAME | grep ID | awk '{ print $2 }' > /tmp/truncate.list | |
| # Delete from id list | |
| cat /tmp/truncate.list | xargs -IID aws dynamodb delete-item --table-name $TABLE_NAME --key '{ "id": { "S": "ID" }}' |