-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(PathArguments): add JobRunner.UploadJobAssetsAsync()
- Loading branch information
1 parent
7adb1fe
commit 2642a00
Showing
3 changed files
with
102 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
| ||
namespace PollinationSDK | ||
{ | ||
public partial class JobPathArgument | ||
{ | ||
public void IsAssetUploaded(bool uploaded) | ||
{ | ||
if (this.Annotations == null) | ||
this.Annotations = new System.Collections.Generic.Dictionary<string, string>(); | ||
|
||
var p = "Uploaded"; | ||
var v = uploaded ? "true" : "false"; | ||
|
||
if (this.Annotations.TryGetValue(p, out var path)) | ||
{ | ||
this.Annotations[p] = v; | ||
} | ||
else | ||
{ | ||
this.Annotations.Add(p, v); | ||
} | ||
} | ||
|
||
public bool IsAssetUploaded() | ||
{ | ||
if (this.Annotations == null) | ||
return false; | ||
|
||
if (this.Annotations.TryGetValue("Uploaded", out var isUploaded)) | ||
{ | ||
return isUploaded == "true"; | ||
} | ||
|
||
return false; | ||
|
||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters