Skip to content

Commit

Permalink
[Urlscan] Increase of max retry to 2minÃ
Browse files Browse the repository at this point in the history
  • Loading branch information
Megafredo committed May 23, 2024
1 parent c454c8b commit 762e9a8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion internal-enrichment/urlscan-enrichment/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,4 @@ After installation, the connector should require minimal interaction to use, and

- If you enrich IPv4 and IPv6 observables, only a link to URLScan search in external reference (OpenCTI) will be generated, but you can play with the search period with the environment variable search_filtered_by_date to refine the search.

- While the analysis is still in progress, the Result API endpoint will respond with an HTTP status code of 404. The connector's polling logic is to wait 10 seconds and retry 6 times, for a maximum wait time of 1 minute, until the analysis is complete or the maximum wait time is reached.
- While the analysis is still in progress, the Result API endpoint will respond with an HTTP status code of 404. The connector's polling logic is to wait 10 seconds and retry 12 times, for a maximum wait time of 2 minutes, until the analysis is complete or the maximum wait time is reached.
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,14 @@ def check_urlscan_user_quota(self, visibility: str) -> None:

def urlscan_result(self, uuid: str) -> dict:
"""
This method allows you to check the user quota available for URLScan,
depending on the visibility in the configuration.
This method recovers all the data of the entity scanned by URLScan, its data may take a moment to be processed
by URLScan, if there is a 404 return and a message "Scan is not finished yet" then we make several attempts.
:param uuid: This parameter contains the uuid of the submitted request.
:return: dict
"""
try:
max_retries = 6
max_retries = 12
retry_delay = 10 # in second

response = self.session.get(
Expand Down

0 comments on commit 762e9a8

Please sign in to comment.