Docker and deployment to fetcher server
This commit is contained in:
@@ -29,13 +29,15 @@ def wait_connection():
|
||||
connected = True
|
||||
|
||||
except psycopg.OperationalError as e:
|
||||
print(str(e))
|
||||
# Connection not ready...
|
||||
# print(".", end="")
|
||||
time.sleep(2)
|
||||
time.sleep(15)
|
||||
except Exception as e:
|
||||
print(str(e))
|
||||
# Connection not ready...
|
||||
# print("e", end="")
|
||||
time.sleep(2)
|
||||
time.sleep(15)
|
||||
|
||||
print("DB connection ready")
|
||||
|
||||
@@ -57,7 +59,8 @@ def initialize_tables():
|
||||
ts_fetch TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
||||
status URL_STATUS NOT NULL DEFAULT 'raw' -- ,
|
||||
-- status_wendy WENDY_STATUS DEFAULT NULL,
|
||||
-- ts_wendy TIMESTAMPTZ DEFAULT NULL
|
||||
-- ts_wendy TIMESTAMPTZ DEFAULT NULL,
|
||||
-- child_abuse BOOLEAN DEFAULT NULL,
|
||||
);
|
||||
CREATE INDEX idx_urls_status ON urls(status);
|
||||
CREATE INDEX idx_urls_ts_fetch ON urls(ts_fetch);
|
||||
|
||||
Reference in New Issue
Block a user