feat(bot): remove hacky fix for extremely slow system deletes
they are no longer extremely slow
This commit is contained in:
@@ -14,7 +14,6 @@ public class MessageContext
|
||||
/// <summary>
|
||||
/// Whether a system is being deleted (no actions should be taken, or commands ran)
|
||||
/// </summary>
|
||||
public bool IsDeleting { get; }
|
||||
public ulong? LogChannel { get; }
|
||||
public bool InBlacklist { get; }
|
||||
public bool InLogBlacklist { get; }
|
||||
|
@@ -1,7 +1,6 @@
|
||||
create function message_context(account_id bigint, guild_id bigint, channel_id bigint)
|
||||
returns table (
|
||||
system_id int,
|
||||
is_deleting bool,
|
||||
log_channel bigint,
|
||||
in_blacklist bool,
|
||||
in_log_blacklist bool,
|
||||
@@ -28,7 +27,6 @@ as $$
|
||||
guild as (select * from servers where id = guild_id)
|
||||
select
|
||||
system.id as system_id,
|
||||
system.is_deleting,
|
||||
guild.log_channel,
|
||||
(channel_id = any (guild.blacklist)) as in_blacklist,
|
||||
(channel_id = any (guild.log_blacklist)) as in_log_blacklist,
|
||||
|
@@ -144,7 +144,6 @@ public partial class ModelRepository
|
||||
|
||||
public async Task DeleteSystem(SystemId id)
|
||||
{
|
||||
await _db.Execute(c => c.QueryAsync("update systems set is_deleting = true where id = @id", new { id = id }));
|
||||
var query = new Query("systems").AsDelete().Where("id", id);
|
||||
await _db.ExecuteQuery(query);
|
||||
_logger.Information("Deleted {SystemId}", id);
|
||||
|
Reference in New Issue
Block a user