Rather embarrasing mistake in rewarderbot interval config param.
This commit is contained in:
parent
f5291517c1
commit
4cd22f3719
|
@ -27,11 +27,11 @@
|
|||
|
||||
public class RewarderBotStartupConfig
|
||||
{
|
||||
public RewarderBotStartupConfig(string discordBotHost, int discordBotPort, string interval, DateTime historyStartUtc, DiscordBotGethInfo gethInfo, string? dataPath)
|
||||
public RewarderBotStartupConfig(string discordBotHost, int discordBotPort, string intervalMinutes, DateTime historyStartUtc, DiscordBotGethInfo gethInfo, string? dataPath)
|
||||
{
|
||||
DiscordBotHost = discordBotHost;
|
||||
DiscordBotPort = discordBotPort;
|
||||
Interval = interval;
|
||||
IntervalMinutes = intervalMinutes;
|
||||
HistoryStartUtc = historyStartUtc;
|
||||
GethInfo = gethInfo;
|
||||
DataPath = dataPath;
|
||||
|
@ -39,7 +39,7 @@
|
|||
|
||||
public string DiscordBotHost { get; }
|
||||
public int DiscordBotPort { get; }
|
||||
public string Interval { get; }
|
||||
public string IntervalMinutes { get; }
|
||||
public DateTime HistoryStartUtc { get; }
|
||||
public DiscordBotGethInfo GethInfo { get; }
|
||||
public string? DataPath { get; set; }
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace CodexDiscordBotPlugin
|
|||
|
||||
AddEnvVar("DISCORDBOTHOST", config.DiscordBotHost);
|
||||
AddEnvVar("DISCORDBOTPORT", config.DiscordBotPort.ToString());
|
||||
AddEnvVar("INTERVALMINUTES", config.Interval);
|
||||
AddEnvVar("INTERVALMINUTES", config.IntervalMinutes);
|
||||
var offset = new DateTimeOffset(config.HistoryStartUtc);
|
||||
AddEnvVar("CHECKHISTORY", offset.ToUnixTimeSeconds().ToString());
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ namespace CodexTests.BasicTests
|
|||
//discordBotPort: botContainer.GetAddress(GetTestLog(), DiscordBotContainerRecipe.RewardsPort).Port,
|
||||
discordBotHost: botContainer.GetInternalAddress(DiscordBotContainerRecipe.RewardsPort).Host,
|
||||
discordBotPort: botContainer.GetInternalAddress(DiscordBotContainerRecipe.RewardsPort).Port,
|
||||
interval: "60",
|
||||
intervalMinutes: "1",
|
||||
historyStartUtc: GetTestRunTimeRange().From - TimeSpan.FromMinutes(3),
|
||||
gethInfo: gethInfo,
|
||||
dataPath: null
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace TestNetRewarder
|
|||
public int DiscordPort { get; set; } = 31080;
|
||||
|
||||
[Uniform("interval-minutes", "im", "INTERVALMINUTES", false, "time in minutes between reward updates. (default 15)")]
|
||||
public int Interval { get; set; } = 15;
|
||||
public int IntervalMinutes { get; set; } = 15;
|
||||
|
||||
[Uniform("check-history", "ch", "CHECKHISTORY", true, "Unix epoc timestamp of a moment in history on which processing begins. Required for hosting rewards. Should be 'launch of the testnet'.")]
|
||||
public int CheckHistoryTimestamp { get; set; } = 0;
|
||||
|
|
|
@ -13,10 +13,10 @@ namespace TestNetRewarder
|
|||
{
|
||||
this.log = log;
|
||||
|
||||
if (configuration.Interval < 0) configuration.Interval = 15;
|
||||
if (configuration.IntervalMinutes < 0) configuration.IntervalMinutes = 15;
|
||||
if (configuration.CheckHistoryTimestamp == 0) throw new Exception("'check-history' unix timestamp is required. Set it to the start/launch moment of the testnet.");
|
||||
|
||||
segmentSize = TimeSpan.FromSeconds(configuration.Interval);
|
||||
segmentSize = TimeSpan.FromMinutes(configuration.IntervalMinutes);
|
||||
start = DateTimeOffset.FromUnixTimeSeconds(configuration.CheckHistoryTimestamp).UtcDateTime;
|
||||
|
||||
log.Log("Starting time segments at " + start);
|
||||
|
|
Loading…
Reference in New Issue