Skip to content

Commit

Permalink
GRIDBOT-87: Finally integrate screenshotting in prod
Browse files Browse the repository at this point in the history
  • Loading branch information
nikita-petko authored and Github Enterprise committed Jan 29, 2022
1 parent e27685c commit 6875924
Show file tree
Hide file tree
Showing 4 changed files with 514 additions and 157 deletions.
15 changes: 9 additions & 6 deletions Shared/MFDLabs.GridCommands/Commands/ViewConsole.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System.Threading.Tasks;
using Discord.WebSocket;
using MFDLabs.Grid.Bot.Extensions;
using MFDLabs.Grid.Bot.Interfaces;
using MFDLabs.Grid.Bot.Tasks;
using MFDLabs.Grid.Bot.Models;
using MFDLabs.Grid.Bot.Tasks.WorkQueues;

namespace MFDLabs.Grid.Bot.Commands
{
Expand All @@ -17,12 +17,15 @@ internal class ViewConsole : IStateSpecificCommandHandler

public Task Invoke(string[] messageContentArray, SocketMessage message, string originalCommand)
{
if (!global::MFDLabs.Grid.Bot.Properties.Settings.Default.SingleInstancedGridServer)
var request = new SocketTaskRequest
{
return message.ReplyAsync("Cannot screenshot grid server in multi-instanced mode!");
}
ContentArray = messageContentArray,
Message = message,
OriginalCommandName = originalCommand
};

GridServerScreenshotWorkQueue.Singleton.EnqueueWorkItem(request);

ScreenshotTask.Singleton.Port.Post(message);
return Task.CompletedTask;
}
}
Expand Down
146 changes: 0 additions & 146 deletions Shared/MFDLabs.GridTasks/Tasks/ScreenshotTask.cs

This file was deleted.

Loading

0 comments on commit 6875924

Please sign in to comment.