Skip to content

Commit c65912e

Browse files
paulborgermansalanking
authored andcommitted
[#712] Implement env variable for altering the default query limit in genquery
1 parent df3968f commit c65912e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

irods/query.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import os
2+
13
from collections import OrderedDict
24

35
from irods import MAX_SQL_ROWS
@@ -34,7 +36,7 @@
3436
"SELECT_COUNT": 6,
3537
}
3638

37-
39+
IRODS_QUERY_LIMIT = os.getenv("IRODS_QUERY_LIMIT", 500)
3840
class Query:
3941

4042
def __init__(self, sess, *args, **kwargs):
@@ -196,7 +198,7 @@ def _kw_message(self):
196198
return StringStringMap(dct)
197199

198200
def _message(self):
199-
max_rows = 500 if self._limit == -1 else self._limit
201+
max_rows = IRODS_QUERY_LIMIT if self._limit == -1 else self._limit
200202
args = {
201203
"maxRows": max_rows,
202204
"continueInx": self._continue_index,

0 commit comments

Comments
 (0)