Skip to content

Commit 03dcb15

Browse files
committed
Keep only relevant log
1 parent 91ff3fd commit 03dcb15

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/apify/storage_clients/_apify/_request_queue_client.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,11 @@ async def add_batch_of_requests(
255255

256256
else:
257257
new_requests.append(request)
258-
logger.info(f'Add new requests: {len(new_requests)}, already present requests: {len(already_present_requests)}')
258+
259+
logger.debug(
260+
f'Adding new requests: {len(new_requests)}, '
261+
f'skipping already present requests: {len(already_present_requests)}'
262+
)
259263
if new_requests:
260264
# Prepare requests for API by converting to dictionaries.
261265
requests_dict = [
@@ -267,7 +271,6 @@ async def add_batch_of_requests(
267271
]
268272

269273
# Send requests to API.
270-
logger.info(f'self._api_client.batch_add_requests, {len(new_requests)=}')
271274
response = await self._api_client.batch_add_requests(requests=requests_dict, forefront=forefront)
272275
# Add new requests to the cache.
273276
for processed_request_raw in response['processedRequests']:
@@ -303,7 +306,6 @@ async def get_request(self, request_id: str) -> Request | None:
303306
Returns:
304307
The request or None if not found.
305308
"""
306-
logger.info(f'self._api_client.get_request, {request_id=}')
307309
response = await self._api_client.get_request(request_id)
308310

309311
if response is None:
@@ -555,7 +557,6 @@ async def _update_request(
555557
Returns:
556558
The updated request
557559
"""
558-
logger.info(f'self._api_client.update_request, {len(request.id)=}')
559560
response = await self._api_client.update_request(
560561
request=request.model_dump(by_alias=True),
561562
forefront=forefront,
@@ -607,7 +608,6 @@ async def _list_head(
607608
lock_time = lock_time or self._DEFAULT_LOCK_TIME
608609
lock_secs = int(lock_time.total_seconds())
609610

610-
logger.info('self._api_client.list_and_lock_head')
611611
response = await self._api_client.list_and_lock_head(
612612
lock_secs=lock_secs,
613613
limit=limit,
@@ -689,7 +689,6 @@ async def _prolong_request_lock(
689689
Returns:
690690
A response containing the time at which the lock will expire.
691691
"""
692-
logger.info(f'self._api_client.prolong_request_lock, {request_id=}')
693692
response = await self._api_client.prolong_request_lock(
694693
request_id=request_id,
695694
forefront=forefront,
@@ -721,7 +720,6 @@ async def _delete_request_lock(
721720
forefront: Whether to put the request in the beginning or the end of the queue after the lock is deleted.
722721
"""
723722
try:
724-
logger.info(f'self._api_client.delete_request_lock, {request_id=}')
725723
await self._api_client.delete_request_lock(
726724
request_id=request_id,
727725
forefront=forefront,

0 commit comments

Comments
 (0)