Commit Graph

4 Commits

Author SHA1 Message Date
Whit Waldo c94b61e0d6
Fix for Jobs mapping handler (#1474)
Tweaked the jobs mapping handler to accept an optional timeout parameter instead of a cancellation token. This applies the timeout, if specified, to each invocation instead of as a global timeout.

---------

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
2025-02-26 03:40:58 -06:00
Whit Waldo e9ee4d21bf
Fix for `GetJobAsync` deserialization issue (#1461)
Bugfix: `GetJobAsync` deserialization failure

Updated GetJobsAsync deserialization to reflect actual values returned

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
2025-02-19 13:07:32 -06:00
Whit Waldo 89d9d56bd5
Fixed Jobs SDK bugs (#1456)
fix: Point-in-time not getting scheduled, job payload not being property set on job invocation

When setting a single point-in-time job, the SDK was incorrectly assigning it as a schedule which would promptly fail cron validation. Rather, this now properly sets it to `dueTime` instead. Further, when a Job is invoked, only the payload it was registered with is provided in the callback, not all the elements of a Get Job response, so this was modified to return the `ReadOnlyMemory<byte>` originally provided in the payload back to the caller.

Reviewed by: @philliphoff
Refs: #1455 #1457
2025-02-11 01:16:35 -06:00
Whit Waldo dfe7feef00
Add .NET client for Dapr Jobs API (#1384)
* Package addition + updates

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* Added Dapr.Jobs project

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* Initial commit - unable to proceed without update on master from streaming sub PR

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* Added class to Dapr.Common, fixed compilation errors

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* Added unit tests for Dapr.Common enum extensions

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* Added unit tests

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* Added missing copyright header

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* Added sample Jobs project

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* Added documentation

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* Added missing copyright header

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* Downgraded Roslyn packages since master doesn't yet have the incremental source generator updates

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* Missed a reference regarding incremental source generators

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* Downgraded packages to fix nullability issues on build

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* Downgraded from 8.* packages back to 6.* packages for the various Microsoft.Extensions.* packages to fix build issues

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* Removed unnecessary assignment

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* Added braces for clarity

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* Added more curley braces

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* More curly braces again

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* Marked two properties as static

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* Updated to handle any order of parameters to endpoint route builder delegate

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* Updated default cancellation token value

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* Added missing package version in Directory.Packages

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* Fixed unit tests

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* Added test to ensure that even if cancellation token is provided, it'll handle the mapping properly

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

---------

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
2024-11-01 12:08:59 -05:00