Skip to content

Commit

Permalink
feat(api): bump max extractor script timeout from 1 minute to 5 minutes
Browse files Browse the repository at this point in the history
  • Loading branch information
azasypkin committed Oct 26, 2024
1 parent 5244eef commit d6cfcc4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/trackers/api_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ const MAX_JOBS_PAGE_SIZE: usize = 1000;
/// Defines the maximum length of the user agent string.
const MAX_TRACKER_PAGE_USER_AGENT_LENGTH: usize = 200;

/// We currently wait up to 60 seconds for extractor script to execute.
const MAX_TRACKER_EXTRACTOR_TIMEOUT: Duration = Duration::from_secs(60);
/// We currently wait up to 300 seconds for extractor script to execute.
const MAX_TRACKER_EXTRACTOR_TIMEOUT: Duration = Duration::from_secs(300);

/// We currently support up to 10 retry attempts for the tracker.
const MAX_TRACKER_RETRY_ATTEMPTS: u32 = 10;
Expand Down Expand Up @@ -1376,13 +1376,13 @@ mod tests {
enabled: true,
target: target.clone(),
config: TrackerConfig {
timeout: Some(Duration::from_secs(61)),
timeout: Some(Duration::from_secs(301)),
..config.clone()
},
tags: tags.clone(),
actions: actions.clone()
}).await),
@r###""Tracker timeout cannot be greater than 60000ms.""###
@r###""Tracker timeout cannot be greater than 300000ms.""###
);

// Empty web page target extractor.
Expand Down Expand Up @@ -2198,12 +2198,12 @@ mod tests {
assert_debug_snapshot!(
update_and_fail(trackers.update_tracker(tracker.id, TrackerUpdateParams {
config: Some(TrackerConfig {
timeout: Some(Duration::from_secs(61)),
timeout: Some(Duration::from_secs(301)),
..tracker.config.clone()
}),
..Default::default()
}).await),
@r###""Tracker timeout cannot be greater than 60000ms.""###
@r###""Tracker timeout cannot be greater than 300000ms.""###
);

// Empty web page target extractor.
Expand Down

0 comments on commit d6cfcc4

Please sign in to comment.