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
in upload handler | |
in file close | |
.. | |
---------------------------------------------------------------------- | |
Ran 2 tests in 0.021s | |
OK |
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
$ curl -XPUT 'http://localhost:9200/twitter/' -d '{ | |
index : { | |
number_of_shards : 3 | |
number_of_replicas : 2 | |
} | |
}' |
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
import signal | |
import logging | |
# class based on: http://stackoverflow.com/a/21919644/487556 | |
class DelayedInterrupt(object): | |
def __init__(self, signals): | |
if not isinstance(signals, list) and not isinstance(signals, tuple): | |
signals = [signals] | |
self.sigs = signals |