import sys
import os
sys.path.insert(0, "../financialScraper")
import pandas as pd
from financialScraper import getqf
from sqlalchemy import create_engine

running = True


# engine = create_engine(os.environ.get('DATABASE_URL'))
engine = create_engine('postgres://fkwfcpvbchmxps:VCmxue5WFWCOOHt56aqOm4FD_Z@ec2-54-83-205-46.compute-1.amazonaws.com:5432/d376d3nru8envq')
dfdict = getqf.scraper()
df = dfdict['nsdqct.csv']
df.to_sql(name='entries', con = engine, if_exists = 'replace')

@@ -223,16 +223,17 @@
 _URL'))%0A
+%0A
 engine =
@@ -364,16 +364,46 @@
 8envq')%0A
+connection = engine.connect()%0A
 dfdict =
@@ -477,22 +477,26 @@
 , con = 
-engine
+connection
 , if_exi
@@ -512,8 +512,28 @@
 place')%0A
+%0Aconnection.close()%0A

Add engine connection, and close engine connection to worker dyno