Move workers
This commit is contained in:
@@ -3,7 +3,7 @@ using System.Diagnostics;
|
|||||||
using Managing.Application.Abstractions;
|
using Managing.Application.Abstractions;
|
||||||
using Managing.Application.Abstractions.Repositories;
|
using Managing.Application.Abstractions.Repositories;
|
||||||
using Managing.Application.Abstractions.Services;
|
using Managing.Application.Abstractions.Services;
|
||||||
using Managing.Application.Backtesting;
|
using Managing.Application.Backtests;
|
||||||
using Managing.Application.Hubs;
|
using Managing.Application.Hubs;
|
||||||
using Managing.Core;
|
using Managing.Core;
|
||||||
using Managing.Domain.Bots;
|
using Managing.Domain.Bots;
|
||||||
@@ -84,7 +84,7 @@ namespace Managing.Application.Tests
|
|||||||
// Act
|
// Act
|
||||||
var backtestResult =
|
var backtestResult =
|
||||||
await _backtester.RunTradingBotBacktest(config, DateTime.UtcNow.AddDays(-6),
|
await _backtester.RunTradingBotBacktest(config, DateTime.UtcNow.AddDays(-6),
|
||||||
DateTime.UtcNow, null, false, false);
|
DateTime.UtcNow, null, false, false);
|
||||||
|
|
||||||
var json = JsonConvert.SerializeObject(backtestResult, Formatting.None);
|
var json = JsonConvert.SerializeObject(backtestResult, Formatting.None);
|
||||||
File.WriteAllText($"{ticker}-{timeframe}-{Guid.NewGuid()}.json", json);
|
File.WriteAllText($"{ticker}-{timeframe}-{Guid.NewGuid()}.json", json);
|
||||||
@@ -256,43 +256,43 @@ namespace Managing.Application.Tests
|
|||||||
{
|
{
|
||||||
BotType.SimpleBot => throw new NotImplementedException(),
|
BotType.SimpleBot => throw new NotImplementedException(),
|
||||||
BotType.ScalpingBot => _backtester.RunTradingBotBacktest(new TradingBotConfig
|
BotType.ScalpingBot => _backtester.RunTradingBotBacktest(new TradingBotConfig
|
||||||
{
|
{
|
||||||
AccountName = _account.Name,
|
AccountName = _account.Name,
|
||||||
MoneyManagement = moneyManagement,
|
MoneyManagement = moneyManagement,
|
||||||
Ticker = ticker,
|
Ticker = ticker,
|
||||||
Scenario = LightScenario.FromScenario(scenario),
|
Scenario = LightScenario.FromScenario(scenario),
|
||||||
Timeframe = timeframe,
|
Timeframe = timeframe,
|
||||||
IsForWatchingOnly = false,
|
IsForWatchingOnly = false,
|
||||||
BotTradingBalance = 1000,
|
BotTradingBalance = 1000,
|
||||||
IsForBacktest = true,
|
IsForBacktest = true,
|
||||||
CooldownPeriod = 1,
|
CooldownPeriod = 1,
|
||||||
MaxLossStreak = 0,
|
MaxLossStreak = 0,
|
||||||
FlipPosition = false,
|
FlipPosition = false,
|
||||||
Name = "Test",
|
Name = "Test",
|
||||||
FlipOnlyWhenInProfit = true,
|
FlipOnlyWhenInProfit = true,
|
||||||
MaxPositionTimeHours = null,
|
MaxPositionTimeHours = null,
|
||||||
CloseEarlyWhenProfitable = false
|
CloseEarlyWhenProfitable = false
|
||||||
}, DateTime.UtcNow.AddDays(-6),
|
}, DateTime.UtcNow.AddDays(-6),
|
||||||
DateTime.UtcNow, null, false, false).Result,
|
DateTime.UtcNow, null, false, false).Result,
|
||||||
BotType.FlippingBot => _backtester.RunTradingBotBacktest(new TradingBotConfig
|
BotType.FlippingBot => _backtester.RunTradingBotBacktest(new TradingBotConfig
|
||||||
{
|
{
|
||||||
AccountName = _account.Name,
|
AccountName = _account.Name,
|
||||||
MoneyManagement = moneyManagement,
|
MoneyManagement = moneyManagement,
|
||||||
Ticker = ticker,
|
Ticker = ticker,
|
||||||
Scenario = LightScenario.FromScenario(scenario),
|
Scenario = LightScenario.FromScenario(scenario),
|
||||||
Timeframe = timeframe,
|
Timeframe = timeframe,
|
||||||
IsForWatchingOnly = false,
|
IsForWatchingOnly = false,
|
||||||
BotTradingBalance = 1000,
|
BotTradingBalance = 1000,
|
||||||
IsForBacktest = true,
|
IsForBacktest = true,
|
||||||
CooldownPeriod = 1,
|
CooldownPeriod = 1,
|
||||||
MaxLossStreak = 0,
|
MaxLossStreak = 0,
|
||||||
FlipPosition = true,
|
FlipPosition = true,
|
||||||
Name = "Test",
|
Name = "Test",
|
||||||
FlipOnlyWhenInProfit = true,
|
FlipOnlyWhenInProfit = true,
|
||||||
MaxPositionTimeHours = null,
|
MaxPositionTimeHours = null,
|
||||||
CloseEarlyWhenProfitable = false
|
CloseEarlyWhenProfitable = false
|
||||||
}, DateTime.UtcNow.AddDays(-6),
|
}, DateTime.UtcNow.AddDays(-6),
|
||||||
DateTime.UtcNow, null, false, false).Result,
|
DateTime.UtcNow, null, false, false).Result,
|
||||||
_ => throw new NotImplementedException(),
|
_ => throw new NotImplementedException(),
|
||||||
};
|
};
|
||||||
timer.Stop();
|
timer.Stop();
|
||||||
@@ -399,43 +399,43 @@ namespace Managing.Application.Tests
|
|||||||
{
|
{
|
||||||
BotType.SimpleBot => throw new NotImplementedException(),
|
BotType.SimpleBot => throw new NotImplementedException(),
|
||||||
BotType.ScalpingBot => _backtester.RunTradingBotBacktest(new TradingBotConfig
|
BotType.ScalpingBot => _backtester.RunTradingBotBacktest(new TradingBotConfig
|
||||||
{
|
{
|
||||||
AccountName = _account.Name,
|
AccountName = _account.Name,
|
||||||
MoneyManagement = moneyManagement,
|
MoneyManagement = moneyManagement,
|
||||||
Ticker = ticker,
|
Ticker = ticker,
|
||||||
Scenario = LightScenario.FromScenario(scenario),
|
Scenario = LightScenario.FromScenario(scenario),
|
||||||
Timeframe = timeframe,
|
Timeframe = timeframe,
|
||||||
IsForWatchingOnly = false,
|
IsForWatchingOnly = false,
|
||||||
BotTradingBalance = 1000,
|
BotTradingBalance = 1000,
|
||||||
IsForBacktest = true,
|
IsForBacktest = true,
|
||||||
CooldownPeriod = 1,
|
CooldownPeriod = 1,
|
||||||
MaxLossStreak = 0,
|
MaxLossStreak = 0,
|
||||||
FlipPosition = false,
|
FlipPosition = false,
|
||||||
Name = "Test",
|
Name = "Test",
|
||||||
FlipOnlyWhenInProfit = true,
|
FlipOnlyWhenInProfit = true,
|
||||||
MaxPositionTimeHours = null,
|
MaxPositionTimeHours = null,
|
||||||
CloseEarlyWhenProfitable = false
|
CloseEarlyWhenProfitable = false
|
||||||
}, DateTime.UtcNow.AddDays(-6),
|
}, DateTime.UtcNow.AddDays(-6),
|
||||||
DateTime.UtcNow, null, false, false).Result,
|
DateTime.UtcNow, null, false, false).Result,
|
||||||
BotType.FlippingBot => _backtester.RunTradingBotBacktest(new TradingBotConfig
|
BotType.FlippingBot => _backtester.RunTradingBotBacktest(new TradingBotConfig
|
||||||
{
|
{
|
||||||
AccountName = _account.Name,
|
AccountName = _account.Name,
|
||||||
MoneyManagement = moneyManagement,
|
MoneyManagement = moneyManagement,
|
||||||
Ticker = ticker,
|
Ticker = ticker,
|
||||||
Scenario = LightScenario.FromScenario(scenario),
|
Scenario = LightScenario.FromScenario(scenario),
|
||||||
Timeframe = timeframe,
|
Timeframe = timeframe,
|
||||||
IsForWatchingOnly = false,
|
IsForWatchingOnly = false,
|
||||||
BotTradingBalance = 1000,
|
BotTradingBalance = 1000,
|
||||||
IsForBacktest = true,
|
IsForBacktest = true,
|
||||||
CooldownPeriod = 1,
|
CooldownPeriod = 1,
|
||||||
MaxLossStreak = 0,
|
MaxLossStreak = 0,
|
||||||
FlipPosition = true,
|
FlipPosition = true,
|
||||||
Name = "Test",
|
Name = "Test",
|
||||||
FlipOnlyWhenInProfit = true,
|
FlipOnlyWhenInProfit = true,
|
||||||
MaxPositionTimeHours = null,
|
MaxPositionTimeHours = null,
|
||||||
CloseEarlyWhenProfitable = false
|
CloseEarlyWhenProfitable = false
|
||||||
}, DateTime.UtcNow.AddDays(-6),
|
}, DateTime.UtcNow.AddDays(-6),
|
||||||
DateTime.UtcNow, null, false, false).Result,
|
DateTime.UtcNow, null, false, false).Result,
|
||||||
_ => throw new NotImplementedException(),
|
_ => throw new NotImplementedException(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using Managing.Application.Abstractions.Repositories;
|
using Managing.Application.Abstractions.Repositories;
|
||||||
using Managing.Application.Abstractions.Services;
|
using Managing.Application.Abstractions.Services;
|
||||||
using Managing.Application.Backtesting;
|
using Managing.Application.Backtests;
|
||||||
using Managing.Application.Bots;
|
using Managing.Application.Bots;
|
||||||
using Managing.Infrastructure.Databases;
|
using Managing.Infrastructure.Databases;
|
||||||
using Managing.Infrastructure.Databases.InfluxDb;
|
using Managing.Infrastructure.Databases.InfluxDb;
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.3" />
|
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
|
||||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\Managing.Application.Abstractions\Managing.Application.Abstractions.csproj" />
|
|
||||||
<ProjectReference Include="..\Managing.Domain\Managing.Domain.csproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
@@ -14,7 +14,7 @@ using Microsoft.Extensions.Logging;
|
|||||||
using static Managing.Common.Enums;
|
using static Managing.Common.Enums;
|
||||||
using LightBacktestResponse = Managing.Domain.Backtests.LightBacktest; // Use the domain model for notification
|
using LightBacktestResponse = Managing.Domain.Backtests.LightBacktest; // Use the domain model for notification
|
||||||
|
|
||||||
namespace Managing.Application.Backtesting
|
namespace Managing.Application.Backtests
|
||||||
{
|
{
|
||||||
public class Backtester : IBacktester
|
public class Backtester : IBacktester
|
||||||
{
|
{
|
||||||
@@ -5,7 +5,7 @@ using Managing.Domain.Candles;
|
|||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using static Managing.Common.Enums;
|
using static Managing.Common.Enums;
|
||||||
|
|
||||||
namespace Managing.Application.Workers;
|
namespace Managing.Application.Trading;
|
||||||
|
|
||||||
public class PricesService : IPricesService
|
public class PricesService : IPricesService
|
||||||
{
|
{
|
||||||
@@ -11,7 +11,7 @@ using Managing.Domain.Trades;
|
|||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using static Managing.Common.Enums;
|
using static Managing.Common.Enums;
|
||||||
|
|
||||||
namespace Managing.Application.Workers;
|
namespace Managing.Application.Trading;
|
||||||
|
|
||||||
public class StatisticService : IStatisticService
|
public class StatisticService : IStatisticService
|
||||||
{
|
{
|
||||||
@@ -46,7 +46,7 @@ public class BalanceTrackingWorker : BaseWorker<BalanceTrackingWorker>
|
|||||||
_logger.LogInformation("Starting balance tracking...");
|
_logger.LogInformation("Starting balance tracking...");
|
||||||
|
|
||||||
// Get all active bots
|
// Get all active bots
|
||||||
var bots = await _mediator.Send(new GetBotsByStatusCommand(BotStatus.Up));
|
var bots = await _mediator.Send(new GetBotsByStatusCommand(BotStatus.Up));
|
||||||
|
|
||||||
var botCount = bots.Count();
|
var botCount = bots.Count();
|
||||||
if (botCount == 0)
|
if (botCount == 0)
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ using Managing.Application.Abstractions;
|
|||||||
using Managing.Application.Abstractions.Repositories;
|
using Managing.Application.Abstractions.Repositories;
|
||||||
using Managing.Application.Abstractions.Services;
|
using Managing.Application.Abstractions.Services;
|
||||||
using Managing.Application.Accounts;
|
using Managing.Application.Accounts;
|
||||||
using Managing.Application.Backtesting;
|
using Managing.Application.Backtests;
|
||||||
using Managing.Application.ManageBot;
|
using Managing.Application.ManageBot;
|
||||||
using Managing.Application.ManageBot.Commands;
|
using Managing.Application.ManageBot.Commands;
|
||||||
using Managing.Application.MoneyManagements;
|
using Managing.Application.MoneyManagements;
|
||||||
|
|||||||
@@ -23,7 +23,6 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Managing.Application.Workers\Managing.Application.Workers.csproj"/>
|
|
||||||
<ProjectReference Include="..\Managing.Application\Managing.Application.csproj"/>
|
<ProjectReference Include="..\Managing.Application\Managing.Application.csproj"/>
|
||||||
<ProjectReference Include="..\Managing.Infrastructure.Database\Managing.Infrastructure.Databases.csproj"/>
|
<ProjectReference Include="..\Managing.Infrastructure.Database\Managing.Infrastructure.Databases.csproj"/>
|
||||||
<ProjectReference Include="..\Managing.Infrastructure.Exchanges\Managing.Infrastructure.Exchanges.csproj"/>
|
<ProjectReference Include="..\Managing.Infrastructure.Exchanges\Managing.Infrastructure.Exchanges.csproj"/>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ using Managing.Application.Abstractions;
|
|||||||
using Managing.Application.Abstractions.Repositories;
|
using Managing.Application.Abstractions.Repositories;
|
||||||
using Managing.Application.Abstractions.Services;
|
using Managing.Application.Abstractions.Services;
|
||||||
using Managing.Application.Accounts;
|
using Managing.Application.Accounts;
|
||||||
using Managing.Application.Backtesting;
|
using Managing.Application.Backtests;
|
||||||
using Managing.Application.ManageBot;
|
using Managing.Application.ManageBot;
|
||||||
using Managing.Application.MoneyManagements;
|
using Managing.Application.MoneyManagements;
|
||||||
using Managing.Application.Scenarios;
|
using Managing.Application.Scenarios;
|
||||||
|
|||||||
@@ -16,10 +16,6 @@
|
|||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.11"/>
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.11"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\Managing.Application.Workers\Managing.Application.Workers.csproj"/>
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="Migrations\"/>
|
<Folder Include="Migrations\"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -47,8 +47,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Managing.Infrastructure.Mes
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Managing.Api.Workers", "Managing.Api.Workers\Managing.Api.Workers.csproj", "{0DC797C2-007C-496E-B4C9-FDBD29D4EF4E}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Managing.Api.Workers", "Managing.Api.Workers\Managing.Api.Workers.csproj", "{0DC797C2-007C-496E-B4C9-FDBD29D4EF4E}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Managing.Application.Workers", "Managing.Application.Workers\Managing.Application.Workers.csproj", "{F0BE6092-102B-43C5-9CAB-88EA28AADC2D}"
|
|
||||||
EndProject
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Managing.Infrastructure.Databases", "Managing.Infrastructure.Database\Managing.Infrastructure.Databases.csproj", "{E6CB238E-8F60-4139-BDE6-31534832198E}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Managing.Infrastructure.Databases", "Managing.Infrastructure.Database\Managing.Infrastructure.Databases.csproj", "{E6CB238E-8F60-4139-BDE6-31534832198E}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Managing.Application.Abstractions", "Managing.Application.Abstractions\Managing.Application.Abstractions.csproj", "{283AC491-97C3-49E0-AB17-272EFB4E5A9C}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Managing.Application.Abstractions", "Managing.Application.Abstractions\Managing.Application.Abstractions.csproj", "{283AC491-97C3-49E0-AB17-272EFB4E5A9C}"
|
||||||
@@ -176,14 +174,6 @@ Global
|
|||||||
{0DC797C2-007C-496E-B4C9-FDBD29D4EF4E}.Release|Any CPU.Build.0 = Release|Any CPU
|
{0DC797C2-007C-496E-B4C9-FDBD29D4EF4E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{0DC797C2-007C-496E-B4C9-FDBD29D4EF4E}.Release|x64.ActiveCfg = Release|x64
|
{0DC797C2-007C-496E-B4C9-FDBD29D4EF4E}.Release|x64.ActiveCfg = Release|x64
|
||||||
{0DC797C2-007C-496E-B4C9-FDBD29D4EF4E}.Release|x64.Build.0 = Release|x64
|
{0DC797C2-007C-496E-B4C9-FDBD29D4EF4E}.Release|x64.Build.0 = Release|x64
|
||||||
{F0BE6092-102B-43C5-9CAB-88EA28AADC2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{F0BE6092-102B-43C5-9CAB-88EA28AADC2D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{F0BE6092-102B-43C5-9CAB-88EA28AADC2D}.Debug|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{F0BE6092-102B-43C5-9CAB-88EA28AADC2D}.Debug|x64.Build.0 = Debug|Any CPU
|
|
||||||
{F0BE6092-102B-43C5-9CAB-88EA28AADC2D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{F0BE6092-102B-43C5-9CAB-88EA28AADC2D}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{F0BE6092-102B-43C5-9CAB-88EA28AADC2D}.Release|x64.ActiveCfg = Release|Any CPU
|
|
||||||
{F0BE6092-102B-43C5-9CAB-88EA28AADC2D}.Release|x64.Build.0 = Release|Any CPU
|
|
||||||
{E6CB238E-8F60-4139-BDE6-31534832198E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{E6CB238E-8F60-4139-BDE6-31534832198E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{E6CB238E-8F60-4139-BDE6-31534832198E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{E6CB238E-8F60-4139-BDE6-31534832198E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{E6CB238E-8F60-4139-BDE6-31534832198E}.Debug|x64.ActiveCfg = Debug|Any CPU
|
{E6CB238E-8F60-4139-BDE6-31534832198E}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
@@ -273,7 +263,6 @@ Global
|
|||||||
{35A05E76-29F6-4DC1-886D-FD69926CB490} = {8F2ECEA7-5BCA-45DF-B6E3-88AADD7AFD45}
|
{35A05E76-29F6-4DC1-886D-FD69926CB490} = {8F2ECEA7-5BCA-45DF-B6E3-88AADD7AFD45}
|
||||||
{AD40302A-27C7-4E9D-B644-C7B141571EAF} = {E453D33B-5C2B-4AA1-834D-2C916EC95FC6}
|
{AD40302A-27C7-4E9D-B644-C7B141571EAF} = {E453D33B-5C2B-4AA1-834D-2C916EC95FC6}
|
||||||
{0DC797C2-007C-496E-B4C9-FDBD29D4EF4E} = {A1296069-2816-43D4-882C-516BCB718D03}
|
{0DC797C2-007C-496E-B4C9-FDBD29D4EF4E} = {A1296069-2816-43D4-882C-516BCB718D03}
|
||||||
{F0BE6092-102B-43C5-9CAB-88EA28AADC2D} = {F6774DB0-DF13-4077-BC94-0E67EE105C4C}
|
|
||||||
{E6CB238E-8F60-4139-BDE6-31534832198E} = {E453D33B-5C2B-4AA1-834D-2C916EC95FC6}
|
{E6CB238E-8F60-4139-BDE6-31534832198E} = {E453D33B-5C2B-4AA1-834D-2C916EC95FC6}
|
||||||
{283AC491-97C3-49E0-AB17-272EFB4E5A9C} = {F6774DB0-DF13-4077-BC94-0E67EE105C4C}
|
{283AC491-97C3-49E0-AB17-272EFB4E5A9C} = {F6774DB0-DF13-4077-BC94-0E67EE105C4C}
|
||||||
{CDDF92D4-9D2E-4134-BD44-3064D6EF462D} = {E453D33B-5C2B-4AA1-834D-2C916EC95FC6}
|
{CDDF92D4-9D2E-4134-BD44-3064D6EF462D} = {E453D33B-5C2B-4AA1-834D-2C916EC95FC6}
|
||||||
|
|||||||
Reference in New Issue
Block a user