public static void OnDownloadFailed(string folder, string file) { var packet = new SpCompilationResult(CompilationResult.DownloadFailed); var connection = FindByUniqueKey(folder); if (connection != null) { packet.Send(connection, true); } Global.WriteLog($"Download failed {folder} / {file}", "Red"); }
public static void OnDownloadCompleted(string folder, string file) { Global.WriteLog($"Download completed {folder} / {file}", "Green"); var connection = FindByUniqueKey(folder); if (!Compiler.CreateStub(folder, folder, $"./{folder}/{file}")) { var packet = new SpCompilationResult(CompilationResult.Failed); if (connection != null) { packet.Send(connection, true); } } else { StartUpload(connection, folder, "output.exe"); } }