refactor(backup): default to 2 retries & 15 minutes delay
This commit is contained in:
parent
8765c5e705
commit
cb22e34215
4 changed files with 10 additions and 10 deletions
|
|
@ -24,11 +24,11 @@ export const AdvancedSection = ({ form }: AdvancedSectionProps) => {
|
|||
min={0}
|
||||
max={32}
|
||||
value={field.value ?? ""}
|
||||
placeholder="e.g., 3"
|
||||
placeholder="e.g., 2"
|
||||
onChange={(e) => field.onChange(e.target.value ? Number(e.target.value) : undefined)}
|
||||
/>
|
||||
</FormControl>
|
||||
<FormDescription>Maximum number of retry attempts if a backup fails (default: 3).</FormDescription>
|
||||
<FormDescription>Maximum number of retry attempts if a backup fails (default: 2).</FormDescription>
|
||||
<FormMessage />
|
||||
</FormItem>
|
||||
)}
|
||||
|
|
@ -46,12 +46,12 @@ export const AdvancedSection = ({ form }: AdvancedSectionProps) => {
|
|||
min={1}
|
||||
max={1440}
|
||||
step={1}
|
||||
placeholder="e.g., 60"
|
||||
placeholder="e.g., 15"
|
||||
value={field.value ?? ""}
|
||||
onChange={(e) => field.onChange(e.target.value ? Number(e.target.value) : undefined)}
|
||||
/>
|
||||
</FormControl>
|
||||
<FormDescription>Delay in minutes before retrying a failed backup (default: 60 minutes).</FormDescription>
|
||||
<FormDescription>Delay in minutes before retrying a failed backup (default: 15 minutes).</FormDescription>
|
||||
<FormMessage />
|
||||
</FormItem>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
ALTER TABLE `backup_schedules_table` ADD `failure_retry_count` integer DEFAULT 0 NOT NULL;--> statement-breakpoint
|
||||
ALTER TABLE `backup_schedules_table` ADD `max_retries` integer DEFAULT 3 NOT NULL;--> statement-breakpoint
|
||||
ALTER TABLE `backup_schedules_table` ADD `retry_delay` integer DEFAULT 3600000 NOT NULL;
|
||||
ALTER TABLE `backup_schedules_table` ADD `max_retries` integer DEFAULT 2 NOT NULL;--> statement-breakpoint
|
||||
ALTER TABLE `backup_schedules_table` ADD `retry_delay` integer DEFAULT 900000 NOT NULL;
|
||||
|
|
|
|||
|
|
@ -592,7 +592,7 @@
|
|||
"type": "integer",
|
||||
"notNull": true,
|
||||
"autoincrement": false,
|
||||
"default": "3",
|
||||
"default": "2",
|
||||
"generated": null,
|
||||
"name": "max_retries",
|
||||
"entityType": "columns",
|
||||
|
|
@ -602,7 +602,7 @@
|
|||
"type": "integer",
|
||||
"notNull": true,
|
||||
"autoincrement": false,
|
||||
"default": "3600000",
|
||||
"default": "900000",
|
||||
"generated": null,
|
||||
"name": "retry_delay",
|
||||
"entityType": "columns",
|
||||
|
|
|
|||
|
|
@ -312,8 +312,8 @@ export const backupSchedulesTable = sqliteTable("backup_schedules_table", {
|
|||
customResticParams: text("custom_restic_params", { mode: "json" }).$type<string[]>().default([]),
|
||||
sortOrder: int("sort_order", { mode: "number" }).notNull().default(0),
|
||||
failureRetryCount: int("failure_retry_count").notNull().default(0),
|
||||
maxRetries: int("max_retries").notNull().default(3),
|
||||
retryDelay: int("retry_delay").notNull().default(3600000),
|
||||
maxRetries: int("max_retries").notNull().default(2),
|
||||
retryDelay: int("retry_delay").notNull().default(900000),
|
||||
createdAt: int("created_at", { mode: "number" })
|
||||
.notNull()
|
||||
.default(sql`(unixepoch() * 1000)`),
|
||||
|
|
|
|||
Loading…
Reference in a new issue