Unclear how to resume iterating with `PageIterator` if the callback returns `False`
まだ誰も着手していません。
評価
調査の方向性
まず PageIterator の実装とその callback 処理を読み、次に要求された動作を issue の .NET 例と比較します。停止した反復処理で完了状態を公開し、現在の位置から再開する方法を判断します。SDK の動作とその使用方法が明確に定義され、検証されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
In other SDKs, the iterator class typically has a Resume method to restart the iteration where it left off, and a corresponding State property to check if the iterator has completed or not. For example, in .NET:
var pageIterator = PageIterator<Message, MessageCollectionResponse>
.CreatePageIterator(
graphClient,
messages,
(msg) =>
{
Console.WriteLine(msg.Subject);
count++;
// If we've iterated over the limit,
// stop the iteration by returning false
return count < pauseAfter;
});
await pageIterator.IterateAsync();
while (pageIterator.State != PagingState.Complete)
{
Console.WriteLine("Iteration paused for 5 seconds...");
await Task.Delay(5000);
// Reset count
count = 0;
await pageIterator.ResumeAsync();
}
Is there a way to do this in this SDK?
- 主要言語
- Python
- スター
- 288
- フォーク
- 52
- 平均マージ
- 8時間 10分
- マージ済み PR(30日)
- 1
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoftgraph/msgraph-sdk-python-core のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
status:waiting-for-triage type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
status:waiting-for-triage type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
microsoftgraph/msgraph-sdk-python-core#1030 · コメント 2 件 · リアクション 4 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 76/100
-
status:waiting-for-triage type:feature
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
microsoftgraph/msgraph-sdk-python-core の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
learningequality/ricecooker#747 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
BSData/horus-heresy-3rd-edition#3171 ·
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
run-llama/llama_index#23199 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
KhronosGroup/glTF-Blender-IO#2769 ·