File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 155155SENTRY_INCLUDE_LOCAL_VARIABLES = False
156156SENTRY_MAX_REQUEST_BODY_SIZE = 'never'
157157
158+ # sync scans
159+ SYNC_SCAN_TIMEOUT_IN_SECONDS_ENV_VAR_NAME = 'SYNC_SCAN_TIMEOUT_IN_SECONDS'
160+ DEFAULT_SYNC_SCAN_TIMEOUT_IN_SECONDS = 180
161+
158162# report with polling
159163REPORT_POLLING_WAIT_INTERVAL_IN_SECONDS = 5
160164DEFAULT_REPORT_POLLING_TIMEOUT_IN_SECONDS = 600
Original file line number Diff line number Diff line change @@ -106,6 +106,13 @@ def get_scan_polling_timeout_in_seconds(self) -> int:
106106 )
107107 )
108108
109+ def get_sync_scan_timeout_in_seconds (self ) -> int :
110+ return int (
111+ self ._get_value_from_environment_variables (
112+ consts .SYNC_SCAN_TIMEOUT_IN_SECONDS_ENV_VAR_NAME , consts .DEFAULT_SYNC_SCAN_TIMEOUT_IN_SECONDS
113+ )
114+ )
115+
109116 def get_report_polling_timeout_in_seconds (self ) -> int :
110117 return int (
111118 self ._get_value_from_environment_variables (
Original file line number Diff line number Diff line change 44from requests import Response
55
66from cycode .cli import consts
7+ from cycode .cli .config import configuration_manager
78from cycode .cli .exceptions .custom_exceptions import CycodeError
89from cycode .cli .files_collector .models .in_memory_zip import InMemoryZip
910from cycode .cyclient import models
@@ -133,7 +134,7 @@ def zipped_file_scan_sync(
133134 },
134135 files = files ,
135136 hide_response_content_log = self ._hide_response_log ,
136- timeout = 60 ,
137+ timeout = configuration_manager . get_sync_scan_timeout_in_seconds () ,
137138 )
138139 return models .ScanResultsSyncFlowSchema ().load (response .json ())
139140
You can’t perform that action at this time.
0 commit comments