mirror of
https://github.com/ansible/awx.git
synced 2026-02-14 17:50:02 -03:30
Removing psycopg2 references
This commit is contained in:
committed by
John Westcott IV
parent
2b8ed66f3e
commit
e47d30974c
@@ -40,14 +40,13 @@ RUN dnf -y update && dnf install -y 'dnf-command(config-manager)' && \
|
||||
postgresql-devel \
|
||||
python3-devel \
|
||||
python3-pip \
|
||||
python3-psycopg2 \
|
||||
python3-setuptools \
|
||||
swig \
|
||||
unzip \
|
||||
xmlsec1-devel \
|
||||
xmlsec1-openssl-devel
|
||||
|
||||
RUN pip3 install virtualenv build
|
||||
RUN pip3 install virtualenv build psycopg
|
||||
|
||||
{% if image_architecture == 'ppc64le' %}
|
||||
RUN dnf -y update && dnf install -y wget && \
|
||||
@@ -121,7 +120,6 @@ RUN dnf -y update && dnf install -y 'dnf-command(config-manager)' && \
|
||||
python3-devel \
|
||||
python3-libselinux \
|
||||
python3-pip \
|
||||
python3-psycopg2 \
|
||||
python3-setuptools \
|
||||
rsync \
|
||||
rsyslog-8.2102.0-106.el9 \
|
||||
@@ -133,7 +131,7 @@ RUN dnf -y update && dnf install -y 'dnf-command(config-manager)' && \
|
||||
xmlsec1-openssl && \
|
||||
dnf -y clean all
|
||||
|
||||
RUN pip3 install virtualenv supervisor dumb-init
|
||||
RUN pip3 install virtualenv supervisor dumb-init psycopg
|
||||
|
||||
RUN rm -rf /root/.cache && rm -rf /tmp/*
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ from io import StringIO
|
||||
from time import time
|
||||
from uuid import uuid4
|
||||
|
||||
import psycopg2
|
||||
import psycopg
|
||||
|
||||
from django import setup as setup_django
|
||||
from django.db import connection
|
||||
@@ -111,7 +111,7 @@ class YieldedRows(StringIO):
|
||||
|
||||
|
||||
def firehose(job, count, created_stamp, modified_stamp):
|
||||
conn = psycopg2.connect(dsn)
|
||||
conn = psycopg.connect(dsn)
|
||||
f = YieldedRows(job, count, created_stamp, modified_stamp)
|
||||
with conn.cursor() as cursor:
|
||||
cursor.copy_expert(
|
||||
@@ -133,7 +133,7 @@ def firehose(job, count, created_stamp, modified_stamp):
|
||||
|
||||
def cleanup(sql):
|
||||
print(sql)
|
||||
conn = psycopg2.connect(dsn)
|
||||
conn = psycopg.connect(dsn)
|
||||
with conn.cursor() as cursor:
|
||||
cursor.execute(sql)
|
||||
conn.commit()
|
||||
@@ -221,7 +221,7 @@ def generate_jobs(jobs, batch_size, time_delta):
|
||||
|
||||
|
||||
def generate_events(events, job, time_delta):
|
||||
conn = psycopg2.connect(dsn)
|
||||
conn = psycopg.connect(dsn)
|
||||
cursor = conn.cursor()
|
||||
|
||||
created_time = datetime.datetime.today() - time_delta - datetime.timedelta(seconds=5)
|
||||
@@ -282,7 +282,7 @@ if __name__ == '__main__':
|
||||
days_delta = params.days_delta
|
||||
batch_size = params.batch_size
|
||||
try:
|
||||
conn = psycopg2.connect(dsn)
|
||||
conn = psycopg.connect(dsn)
|
||||
cursor = conn.cursor()
|
||||
|
||||
# Drop all the indexes before generating jobs
|
||||
|
||||
Reference in New Issue
Block a user