Skip to content

Commit

Permalink
Merge pull request #338 from HSF/dev
Browse files Browse the repository at this point in the history
fix transformer to add cache_expire_seconds
  • Loading branch information
wguanicedew authored Aug 28, 2024
2 parents 48ab214 + aef5d81 commit 4e63009
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion main/lib/idds/agents/transformer/transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ def __init__(self, num_threads=1, max_number_workers=8, poll_period=1800, retrie

self.show_queue_size_time = None

if hasattr(self, 'cache_expire_seconds'):
self.cache_expire_seconds = int(self.cache_expire_seconds)
else:
self.cache_expire_seconds = 3600

def is_ok_to_run_more_transforms(self):
if self.number_workers >= self.max_number_workers:
return False
Expand Down Expand Up @@ -193,7 +198,7 @@ def get_queue_transforms(self):
# next_poll_at = datetime.datetime.utcnow() + datetime.timedelta(seconds=self.poll_period)
transforms_q = core_transforms.get_transforms_by_status(status=transform_status, locking=True,
not_lock=True, order_by_fifo=True,
new_poll=True, only_return_id=True,
new_poll=True,
min_request_id=BaseAgent.min_request_id,
bulk_size=self.retrieve_bulk_size)

Expand Down

0 comments on commit 4e63009

Please sign in to comment.