appendix: 23 Code-Ausschnitte aus dem Houston-Repository
Pin nixpkgs to the revision used by itc.componentware: the channel version ships a latexminted that crashes on Python 3.14, which made every listing fail and sent latexmk into an endless error prompt. Also force nonstopmode/halt-on-error so a broken listing can never loop again.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
private async IAsyncEnumerable<DocumentKey> ListDocumentsAsync(
|
||||
OrgSlug org,
|
||||
DocumentRelativePath? startAfter,
|
||||
[EnumeratorCancellation] CancellationToken cancellationToken)
|
||||
{
|
||||
var isFirstRequest = true;
|
||||
var requestBuilder = () =>
|
||||
{
|
||||
var r = new ListObjectsV2Request
|
||||
{
|
||||
Prefix = org.ToString(),
|
||||
StartAfter = isFirstRequest && startAfter is { } doc
|
||||
? new DocumentKey(org, doc.Type, doc.Name).ToString()
|
||||
: null,
|
||||
};
|
||||
|
||||
isFirstRequest = false;
|
||||
|
||||
return r;
|
||||
};
|
||||
|
||||
await foreach (var obj in EnumerateObjectsAsync(requestBuilder, cancellationToken))
|
||||
if (DocumentKey.TryFromS3Key(obj.Key, out var key))
|
||||
yield return key.Value;
|
||||
}
|
||||
Reference in New Issue
Block a user