Skip to content

Commit

Permalink
Add gc collect
Browse files Browse the repository at this point in the history
  • Loading branch information
talsabagport committed Oct 22, 2024
1 parent d3f47d5 commit c5de697
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions integrations/jira/jira/client.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import asyncio
import gc
import typing
from typing import Any, AsyncGenerator

Expand Down Expand Up @@ -175,6 +176,8 @@ class MallInfo(ctypes.Structure):
print(f"RSS before trim: {process.memory_info().rss / 1024 ** 2} MB")
libc.malloc_trim(0) # Pass 0 to trim all possible memory
print(f"RSS after trim: {process.memory_info().rss / 1024 ** 2} MB")
gc.collect()
print(f"RSS after gc collect: {process.memory_info().rss / 1024 ** 2} MB")

async def get_paginated_issues(self) -> AsyncGenerator[list[dict[str, Any]], None]:
logger.info("Getting issues from Jira")
Expand Down
2 changes: 1 addition & 1 deletion integrations/jira/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "jira"
version = "0.1.89-dev029"
version = "0.1.89-dev030"
description = "Integration to bring information from Jira into Port"
authors = ["Mor Paz <[email protected]>"]

Expand Down

0 comments on commit c5de697

Please sign in to comment.