This file contains hidden or 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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
# Reload python flask server by function / API endpoint | |
# References: | |
# https://docs.python.org/3/library/multiprocessing.html | |
# http://stackoverflow.com/questions/27723287/reload-python-flask-server-by-function | |
import os |
This file contains hidden or 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 json | |
from elasticsearch import Elasticsearch | |
from elasticsearch import helpers | |
from elasticsearch.client import IndicesClient | |
source = '192.131.117.237:9200/' # example | |
dest = '192.226.457.547:9200/' # another example | |
es_source = Elasticsearch([source]) | |
es_dest = Elasticsearch([dest]) |