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 155
155
SENTRY_INCLUDE_LOCAL_VARIABLES = False
156
156
SENTRY_MAX_REQUEST_BODY_SIZE = 'never'
157
157
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
+
158
162
# report with polling
159
163
REPORT_POLLING_WAIT_INTERVAL_IN_SECONDS = 5
160
164
DEFAULT_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:
106
106
)
107
107
)
108
108
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
+
109
116
def get_report_polling_timeout_in_seconds (self ) -> int :
110
117
return int (
111
118
self ._get_value_from_environment_variables (
Original file line number Diff line number Diff line change 4
4
from requests import Response
5
5
6
6
from cycode .cli import consts
7
+ from cycode .cli .config import configuration_manager
7
8
from cycode .cli .exceptions .custom_exceptions import CycodeError
8
9
from cycode .cli .files_collector .models .in_memory_zip import InMemoryZip
9
10
from cycode .cyclient import models
@@ -133,7 +134,7 @@ def zipped_file_scan_sync(
133
134
},
134
135
files = files ,
135
136
hide_response_content_log = self ._hide_response_log ,
136
- timeout = 60 ,
137
+ timeout = configuration_manager . get_sync_scan_timeout_in_seconds () ,
137
138
)
138
139
return models .ScanResultsSyncFlowSchema ().load (response .json ())
139
140
You can’t perform that action at this time.
0 commit comments