fix(node): 允许零输入软件任务接单
This commit is contained in:
parent
30180d3816
commit
2a7c6a0fb2
|
|
@ -371,6 +371,8 @@ class WindowsNodeSourceTests(unittest.TestCase):
|
|||
self.assertNotIn("IsValidOriginRequest", inbox)
|
||||
self.assertNotIn("IsValidPlot", inbox)
|
||||
self.assertIn('root.TryGetProperty("input_transfers"', inbox)
|
||||
self.assertIn("transfers.GetArrayLength() > 16", inbox)
|
||||
self.assertNotIn("transfers.GetArrayLength() is < 1 or > 16", inbox)
|
||||
self.assertIn('"input", key, filename', inbox)
|
||||
self.assertIn("FileOptions.WriteThrough", inbox)
|
||||
self.assertIn("stream.Flush(flushToDisk: true)", inbox)
|
||||
|
|
|
|||
|
|
@ -457,7 +457,7 @@ internal sealed class JobInboxStore(string jobsDirectory)
|
|||
private static bool IsValidInputTransfers(JsonElement transfers, Guid jobId)
|
||||
{
|
||||
if (transfers.ValueKind != JsonValueKind.Array
|
||||
|| transfers.GetArrayLength() is < 1 or > 16)
|
||||
|| transfers.GetArrayLength() > 16)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue