Skip to content

Commit 155daaf

Browse files
committed
Update process.py
1 parent a8a2683 commit 155daaf

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

utils/process.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ def processing_finished(future):
367367

368368

369369
def autoprocess(
370-
parallel=1, failed_processing=False, maxtasksperchild=7, memory_debugging=False, processing_timeout=300, debug: bool = False
370+
parallel=1, failed_processing=False, maxtasksperchild=7, memory_debugging=False, processing_timeout=300, debug: bool = False, disable_memory_limit: bool = False
371371
):
372372
"""
373373
Automatically processes analysis data using a process pool.
@@ -392,7 +392,8 @@ def autoprocess(
392392
# pool = multiprocessing.Pool(parallel, init_worker)
393393
pool = False
394394
try:
395-
memory_limit()
395+
if not disable_memory_limit:
396+
memory_limit()
396397
log.info("Processing analysis data")
397398
with pebble.ProcessPool(max_workers=parallel, max_tasks=maxtasksperchild, initializer=init_worker) as pool:
398399
# CAUTION - big ugly loop ahead.
@@ -604,6 +605,7 @@ def main():
604605
default=False,
605606
required=False,
606607
)
608+
parser.add_argument("--disable-memory-limit", help="Disable memory limit.", action="store_true", default=False, required=False)
607609
args = parser.parse_args()
608610

609611
init_database()
@@ -617,6 +619,7 @@ def main():
617619
memory_debugging=args.memory_debugging,
618620
processing_timeout=args.processing_timeout,
619621
debug=args.debug,
622+
disable_memory_limit= args.disable_memory_limit,
620623
)
621624
else:
622625
for start, end in args.id:

0 commit comments

Comments
 (0)