chore: Improve Redis retry behavior (#10440)

This commit is contained in:
Tom Moor
2025-10-21 05:54:13 +02:00
committed by GitHub
parent a85f36d896
commit 06d4d7e893
2 changed files with 79 additions and 1 deletions

View File

@@ -15,7 +15,7 @@ const defaultOptions: RedisOptions = {
retryStrategy(times: number) {
Logger.warn(`Retrying redis connection: attempt ${times}`);
return Math.min(times * 100, 3000);
return Math.min(times * 500, 3000);
},
reconnectOnError(err) {
@@ -72,6 +72,14 @@ export default class RedisAdapter extends Redis {
// we're running. Increase the max here to prevent a warning in the console:
// https://github.com/OptimalBits/bull/issues/1192
this.setMaxListeners(100);
this.on("error", (err) => {
if (err.name === "MaxRetriesPerRequestError") {
Logger.fatal("Redis maximum retries exceeded", err);
} else {
Logger.error("Redis error", err);
}
});
}
private static client: RedisAdapter;

View File

@@ -1211,6 +1211,76 @@
"Expires today": "Expires today",
"Expires tomorrow": "Expires tomorrow",
"Expires {{ date }}": "Expires {{ date }}",
"New attribute": "New attribute",
"Paper size": "Paper size",
"Ask AI \"{{question}}\"": "Ask AI \"{{question}}\"",
"Are you sure you want to delete?": "Are you sure you want to delete?",
"Deleting this version of the document will permanently and irrevocably remove it from the history.": "Deleting this version of the document will permanently and irrevocably remove it from the history.",
"Format": "Format",
"Add option": "Add option",
"Optional": "Optional",
"Choose a size for your exported document": "Choose a size for your exported document",
"Revision renamed": "Revision renamed",
"Failed to save revision": "Failed to save revision",
"Invite to document": "Invite to document",
"Sorry, invalid embed link": "Sorry, invalid embed link",
"Data Attributes": "Data Attributes",
"Edit attribute": "Edit attribute",
"Property": "Property",
"Yes": "Yes",
"No": "No",
"Search or ask a question": "Search or ask a question",
"Invited {{roleName}} will not receive access to any collections or documents unless explicitly shared.": "Invited {{roleName}} will not receive access to any collections or documents unless explicitly shared.",
"Can view only what is explicitly shared": "Can view only what is explicitly shared",
"SAML assertion was invalid or missing fields, please check your configuration": "SAML assertion was invalid or missing fields, please check your configuration",
"AI generated answer based on related documents in your workspace": "AI generated answer based on related documents in your workspace",
"References": "References",
"Enable AI answers to get direct answers to searched questions.": "Enable AI answers to get direct answers to searched questions.",
"Go to settings": "Go to settings",
"Where do I find the file?": "Where do I find the file?",
"In a Confluence space, navigate to <em>Space Settings -> Manage space -> Export space</em> and choose to export as HTML with the \"Normal Export\" option.": "In a Confluence space, navigate to <em>Space Settings -> Manage space -> Export space</em> and choose to export as HTML with the \"Normal Export\" option.",
"Drag and drop the zip file from Confluence's HTML export option, or click to upload": "Drag and drop the zip file from Confluence's HTML export option, or click to upload",
"Guests": "Guests",
"New Attribute": "New Attribute",
"Attributes allow you to define data to be stored with your documents. They can be used to store custom properties, metadata, or any other structured information that is common across documents.": "Attributes allow you to define data to be stored with your documents. They can be used to store custom properties, metadata, or any other structured information that is common across documents.",
"Custom domain": "Custom domain",
"AI answers": "AI answers",
"Use AI to directly answer searched questions using content in your workspace.": "Use AI to directly answer searched questions using content in your workspace.",
"API access": "API access",
"Allow members to create API keys for programmatic access": "Allow members to create API keys for programmatic access",
"Public document embedding": "Public document embedding",
"When enabled, publicly shared documents can be embedded in third-party websites": "When enabled, publicly shared documents can be embedded in third-party websites",
"Include previews in emails": "Include previews in emails",
"When enabled, email notifications will include content previews": "When enabled, email notifications will include content previews",
"Boolean": "Boolean",
"Number": "Number",
"Text": "Text",
"List": "List",
"Could not load events": "Could not load events",
"Audit Log": "Audit Log",
"The audit log details the history of security related and other events across your knowledge base.": "The audit log details the history of security related and other events across your knowledge base.",
"IP address": "IP address",
"Actor": "Actor",
"Event": "Event",
"Timestamp": "Timestamp",
"IP": "IP",
"a group": "a group",
"All users": "All users",
"Private": "Private",
"View and edit": "View and edit",
"Sharing enabled": "Sharing enabled",
"Date archived": "Date archived",
"Could not load collections": "Could not load collections",
"Manage the permissions and settings of all collections in the knowledge base. As a workspace admin you can also administer private collections.": "Manage the permissions and settings of all collections in the knowledge base. As a workspace admin you can also administer private collections.",
"Automatically index and search document content from {{appName}} inside <4>Glean</4> in realtime.": "Automatically index and search document content from {{appName}} inside <4>Glean</4> in realtime.",
"API Endpoint": "API Endpoint",
"API Secret": "API Secret",
"Datasource": "Datasource",
"Details of the current {{appName}} license. To arrange contract renewal as expiry or seat limits approach or increase licensed seats please contact your account manager or email <4>priority@getoutline.com</4>.": "Details of the current {{appName}} license. To arrange contract renewal as expiry or seat limits approach or increase licensed seats please contact your account manager or email <4>priority@getoutline.com</4>.",
"Sorry, an answer could not be found in the collection, try widening your search.": "Sorry, an answer could not be found in the collection, try widening your search.",
"Sorry, an answer could not be found in the workspace, try widening your search.": "Sorry, an answer could not be found in the workspace, try widening your search.",
"Looking for answers": "Looking for answers",
"Answer to \"{{ query }}\"": "Answer to \"{{ query }}\"",
"Whoops, you need to accept the permissions in GitHub to connect {{appName}} to your workspace. Try again?": "Whoops, you need to accept the permissions in GitHub to connect {{appName}} to your workspace. Try again?",
"Something went wrong while authenticating your request. Please try logging in again.": "Something went wrong while authenticating your request. Please try logging in again.",
"The owner of GitHub account has been requested to install the {{githubAppName}} GitHub app. Once approved, previews will be shown for respective links.": "The owner of GitHub account has been requested to install the {{githubAppName}} GitHub app. Once approved, previews will be shown for respective links.",