mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-06 22:07:55 +00:00
Bulk import switches for pk;import
We're now using binary import for switches and switch_members when importing a system profile, rather than importing them one switch at a time. This adds a pass-through method to the PerformanceTrackingConnection that can be used for other bulk import applications.
This commit is contained in:
parent
3d21adeec9
commit
406f005b4f
3 changed files with 80 additions and 3 deletions
|
|
@ -179,9 +179,10 @@ namespace PluralKit.Bot
|
|||
mappedSwitches.Add(mapped);
|
||||
}
|
||||
// Import switches
|
||||
await _switches.RegisterSwitches(system, mappedSwitches);
|
||||
if (mappedSwitches.Any())
|
||||
await _switches.BulkImportSwitches(system, mappedSwitches);
|
||||
|
||||
_logger.Information("Imported system {System}", system.Id);
|
||||
_logger.Information("Imported system {System}", system.Hid);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue