Skip to content

Commit

Permalink
Merge pull request #156 from mcrossley/master
Browse files Browse the repository at this point in the history
Build 3204 - Version 3.21.0
  • Loading branch information
mcrossley authored Sep 2, 2022
2 parents 14ab534 + 48f7c8a commit b9f5f6a
Show file tree
Hide file tree
Showing 10 changed files with 320 additions and 70 deletions.
20 changes: 18 additions & 2 deletions CumulusMX/Api.cs
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@ public async Task PostEditData(string req)
case "datalogs":
await writer.WriteAsync(dataEditor.EditDatalog(HttpContext));
break;
case "mysqlcache":
await writer.WriteAsync(dataEditor.EditMySqlCache(HttpContext));
break;
default:
Response.StatusCode = 404;
break;
Expand Down Expand Up @@ -264,6 +267,9 @@ public async Task GetData(string req)
//return await this.JsonResponseAsync(Station.GetDiarySummary(year, month));
await writer.WriteAsync(Station.GetDiarySummary());
break;
case "mysqlcache.json":
await writer.WriteAsync(Station.GetCachedSqlCommands(draw, start, length, search));
break;
default:
Response.StatusCode = 404;
break;
Expand Down Expand Up @@ -1393,9 +1399,19 @@ public async Task GetUtilData(string req)
var cnt = 0;
while (Program.cumulus.MySqlFailedList.TryDequeue(out var item))
{
cnt++;
cnt++;
};
await writer.WriteAsync($"Failed queue cleared of {cnt} commands");
_ = Station.RecentDataDb.Execute("DELETE FROM SqlCache");
string msg;
if (cnt == 0)
{
msg = "The MySQL cache is already empty!";
}
else
{
msg = $"Cached MySQL queue cleared of {cnt} commands";
}
await writer.WriteAsync(msg);
break;
default:
Response.StatusCode = 404;
Expand Down
4 changes: 4 additions & 0 deletions CumulusMX/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="MimeKit" publicKeyToken="bede1c8a46c66814" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.4.0.0" newVersion="3.4.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Loading

0 comments on commit b9f5f6a

Please sign in to comment.