Skip to content

Commit 3210080

Browse files
author
Andrey
committed
Remove any delete from abi_jobs.
1 parent ee81663 commit 3210080

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

moonstreamapi/moonstreamapi/actions.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -612,13 +612,6 @@ def delete_seer_subscription(
612612
"""
613613
Delete seer subscription from db
614614
"""
615-
616-
## Delete subscription from db
617-
associated_jobs = db_session.query(AbiSubscriptions.abi_job_id).filter(
618-
AbiSubscriptions.subscription_id == subscription_id
619-
).all()
620-
job_ids = [job_id for (job_id,) in associated_jobs]
621-
# Delete subscription from db
622615

623616
try:
624617
db_session.query(AbiSubscriptions).filter(
@@ -630,15 +623,6 @@ def delete_seer_subscription(
630623
db_session.rollback()
631624
return
632625

633-
if job_ids:
634-
try:
635-
db_session.query(AbiJobs).filter(
636-
AbiJobs.id.in_(job_ids)
637-
).delete(synchronize_session=False)
638-
db_session.commit()
639-
except Exception as e:
640-
logger.error(f"Error deleting abi jobs from db: {str(e)}")
641-
db_session.rollback()
642626

643627
def add_abi_to_db(
644628
db_session: Session,

0 commit comments

Comments
 (0)