Compare commits

..

6 Commits

Author SHA1 Message Date
JustArchi
bce0649822 Closes #2728 2022-10-28 19:08:14 +02:00
Arkadiusz Sygulski
17563149b6 Update count parameter when loading inventory (#2730)
This change lessers the impacts of recent changes to the endpoint. It is still limited, but at least you can do more than 3 requests 😃
2022-10-28 19:00:05 +02:00
renovate[bot]
0af94d491f Update ASF-ui digest to 5f9969b 2022-10-28 03:49:52 +00:00
ArchiBot
3d674ab781 Automatic translations update 2022-10-28 02:46:25 +00:00
renovate[bot]
c7b39ddad9 Update actions/setup-dotnet action to v3.0.3 2022-10-27 14:46:42 +00:00
JustArchi
8b870b290f Bump 2022-10-27 11:38:44 +02:00
8 changed files with 13 additions and 9 deletions

View File

@@ -24,7 +24,7 @@ jobs:
submodules: recursive
- name: Setup .NET Core
uses: actions/setup-dotnet@v3.0.2
uses: actions/setup-dotnet@v3.0.3
with:
dotnet-version: ${{ env.DOTNET_SDK_VERSION }}

View File

@@ -30,7 +30,7 @@ jobs:
submodules: recursive
- name: Setup .NET Core
uses: actions/setup-dotnet@v3.0.2
uses: actions/setup-dotnet@v3.0.3
with:
dotnet-version: ${{ env.DOTNET_SDK_VERSION }}

2
ASF-ui

Submodule ASF-ui updated: 3fd92393cb...5f9969bf17

View File

@@ -42,7 +42,7 @@ using ArchiSteamFarm.Web;
namespace ArchiSteamFarm.Core;
internal sealed class RemoteCommunication : IAsyncDisposable, IDisposable {
private const ushort MaxItemsForFairBots = ArchiWebHandler.MaxItemsInSingleInventoryRequest * WebBrowser.MaxTries; // Determines which fair bots we'll deprioritize when matching due to excessive number of inventory requests they need to make, which are likely to fail in the process or cause excessive delays
private const ushort MaxItemsForFairBots = ArchiWebHandler.RecommendedItemsInSingleInventoryRequest * WebBrowser.MaxTries; // Determines which fair bots we'll deprioritize when matching due to excessive number of inventory requests they need to make, which are likely to fail in the process or cause excessive delays
private const byte MaxMatchedBotsHard = 40; // Determines how many bots we can attempt to match in total, where match attempt is equal to analyzing bot's inventory
private const byte MaxMatchingRounds = 10; // Determines maximum amount of matching rounds we're going to consider before leaving the rest of work for the next batch
private const byte MinAnnouncementCheckTTL = 6; // Minimum amount of hours we must wait before checking eligibility for Announcement, should be lower than MinPersonaStateTTL

View File

@@ -48,10 +48,11 @@ using SteamKit2;
namespace ArchiSteamFarm.Steam.Integration;
public sealed class ArchiWebHandler : IDisposable {
internal const ushort MaxItemsInSingleInventoryRequest = 5000;
internal const ushort RecommendedItemsInSingleInventoryRequest = 2000; // In regards to rate limits
private const string EconService = "IEconService";
private const string LoyaltyRewardsService = "ILoyaltyRewardsService";
private const ushort MaxItemsInSingleInventoryRequest = 5000;
private const byte MinimumSessionValidityInSeconds = 10;
private const string SteamAppsService = "ISteamApps";
private const string SteamUserAuthService = "ISteamUserAuth";
@@ -135,6 +136,8 @@ public sealed class ArchiWebHandler : IDisposable {
throw new InvalidOperationException(nameof(ASF.InventorySemaphore));
}
ushort count = RecommendedItemsInSingleInventoryRequest;
if (steamID == 0) {
if (!Initialized) {
byte connectionTimeout = ASF.GlobalConfig?.ConnectionTimeout ?? GlobalConfig.DefaultConnectionTimeout;
@@ -149,6 +152,7 @@ public sealed class ArchiWebHandler : IDisposable {
}
steamID = Bot.SteamID;
count = MaxItemsInSingleInventoryRequest;
} else if (!new SteamID(steamID).IsIndividualAccount) {
throw new NotSupportedException(string.Format(CultureInfo.CurrentCulture, Strings.ErrorObjectIsNull, nameof(steamID)));
}
@@ -161,7 +165,7 @@ public sealed class ArchiWebHandler : IDisposable {
int rateLimitingDelay = (ASF.GlobalConfig?.InventoryLimiterDelay ?? GlobalConfig.DefaultInventoryLimiterDelay) * 1000;
while (true) {
Uri request = new(SteamCommunityURL, $"/inventory/{steamID}/{appID}/{contextID}?count={MaxItemsInSingleInventoryRequest}&l=english{(startAssetID > 0 ? $"&start_assetid={startAssetID}" : "")}");
Uri request = new(SteamCommunityURL, $"/inventory/{steamID}/{appID}/{contextID}?count={count}&l=english{(startAssetID > 0 ? $"&start_assetid={startAssetID}" : "")}");
await ASF.InventorySemaphore.WaitAsync().ConfigureAwait(false);

View File

@@ -73,7 +73,7 @@ public sealed class GlobalConfig {
public const byte DefaultIdleFarmingPeriod = 8;
[PublicAPI]
public const byte DefaultInventoryLimiterDelay = 3;
public const byte DefaultInventoryLimiterDelay = 4;
[PublicAPI]
public const bool DefaultIPC = true;

View File

@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Version>5.3.2.3</Version>
<Version>5.3.2.4</Version>
</PropertyGroup>
<PropertyGroup>

2
wiki

Submodule wiki updated: 7062284646...a35a04f2e6