11import os
22from pathlib import Path
3+ from typing import Optional
34
45import lightning_cloud .env
56
@@ -13,7 +14,7 @@ def get_lightning_cloud_url() -> str:
1314
1415SUPPORTED_PRIMITIVE_TYPES = (type (None ), str , int , float , bool )
1516STATE_UPDATE_TIMEOUT = 0.001
16- STATE_ACCUMULATE_WAIT = 0.05
17+ STATE_ACCUMULATE_WAIT = 0.15
1718# Duration in seconds of a moving average of a full flow execution
1819# beyond which an exception is raised.
1920FLOW_DURATION_THRESHOLD = 1.0
@@ -25,7 +26,6 @@ def get_lightning_cloud_url() -> str:
2526APP_SERVER_PORT = _find_lit_app_port (7501 )
2627APP_STATE_MAX_SIZE_BYTES = 1024 * 1024 # 1 MB
2728
28- CLOUD_QUEUE_TYPE = os .getenv ("LIGHTNING_CLOUD_QUEUE_TYPE" , None )
2929WARNING_QUEUE_SIZE = 1000
3030# different flag because queue debug can be very noisy, and almost always not useful unless debugging the queue itself.
3131QUEUE_DEBUG_ENABLED = bool (int (os .getenv ("LIGHTNING_QUEUE_DEBUG_ENABLED" , "0" )))
@@ -77,5 +77,9 @@ def enable_multiple_works_in_default_container() -> bool:
7777 return bool (int (os .getenv ("ENABLE_MULTIPLE_WORKS_IN_DEFAULT_CONTAINER" , "0" )))
7878
7979
80+ def get_cloud_queue_type () -> Optional [str ]:
81+ return os .getenv ("LIGHTNING_CLOUD_QUEUE_TYPE" , None )
82+
83+
8084# Number of seconds to wait between filesystem checks when waiting for files in remote storage
8185REMOTE_STORAGE_WAIT = 0.5
0 commit comments