Skip to content

Commit

Permalink
Add startTimeOut config
Browse files Browse the repository at this point in the history
  • Loading branch information
Трембовецкий Н.А authored and Трембовецкий Н.А committed Jan 14, 2020
1 parent b830745 commit 7b34c7a
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 2 deletions.
15 changes: 15 additions & 0 deletions Runner/Properties/PublishProfiles/x64.pubxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<TargetFramework>netcoreapp2.2</TargetFramework>
<PublishDir>bin\publish\x64</PublishDir>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
</PropertyGroup>
</Project>
15 changes: 15 additions & 0 deletions Runner/Properties/PublishProfiles/x86.pubxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<TargetFramework>netcoreapp2.2</TargetFramework>
<PublishDir>bin\publish\x86</PublishDir>
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
<SelfContained>true</SelfContained>
</PropertyGroup>
</Project>
1 change: 1 addition & 0 deletions steam-dropler/Configs/MainConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"maFileFolder": "C:/Users/Koper/Desktop/sda/maFiles",//cahnge you folder
"dropHistoryFolder": "/DropHistory",//change you folder
"parallelCount": 100,
"startTimeOut": 30,
"timeConfig": {
"IdleTime": 60,
"PauseBeatwinIdleTime" : 660
Expand Down
2 changes: 2 additions & 0 deletions steam-dropler/Model/MainConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ public class MainConfig

public TimeConfig TimeConfig { get; set; }

public int StartTimeOut { get; set; }

public static void Load()
{
var obj = JsonConvert.DeserializeObject<MainConfig>(File.ReadAllText(ConfigPath));
Expand Down
7 changes: 5 additions & 2 deletions steam-dropler/Worker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,13 @@ public static class Worker

public static void Start()
{
_timer = new Timer(1000 * 30);



_timer = new Timer(1000 * MainConfig.Config.StartTimeOut);
_timer.Elapsed += CheckToAdd;
_timer.Start();
Console.WriteLine("Аккаунты запускаются с переодичностью 30 секунд.");
Console.WriteLine($"Аккаунты запускаются с переодичностью {MainConfig.Config.StartTimeOut} секунд.");
Console.WriteLine($"Всего аккаунтов {_accounts.Count}, будут фармиться {_accounts.Count(t=>t.IdleEnable && t.MobileAuth?.SharedSecret!=null)}");

}
Expand Down

0 comments on commit 7b34c7a

Please sign in to comment.