From 01eefd67e01595a31b96e455e4b451ceab754550 Mon Sep 17 00:00:00 2001 From: Victor Grau Serrat Date: Fri, 15 Sep 2017 10:51:04 -0600 Subject: [PATCH] ingestion switch to create_writers when ingesting locally --- catalyst/data/bundles/poloniex.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/catalyst/data/bundles/poloniex.py b/catalyst/data/bundles/poloniex.py index eb4fc735..85ee6b8d 100644 --- a/catalyst/data/bundles/poloniex.py +++ b/catalyst/data/bundles/poloniex.py @@ -13,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +import sys + from datetime import datetime import pandas as pd @@ -166,4 +168,9 @@ register_bundle(PoloniexBundle, ['USDT_BTC',]) For a production environment make sure to use (to bundle all pairs): register_bundle(PoloniexBundle) ''' -register_bundle(PoloniexBundle, create_writers=False) + +if 'ingest' in sys.argv and '-c' in sys.argv: + register_bundle(PoloniexBundle) +else: + register_bundle(PoloniexBundle, create_writers=False) +