4 Commits

Author SHA1 Message Date
connorivy d20d3d022a Merge pull request #4 from specklesystems/function-memory
build and deploy Speckle functions / publish-automate-function-version (push) Has been cancelled
Update main.yml
2024-02-16 08:31:27 -06:00
Jedd Morgan b6e9dd9b5d Update main.yml 2024-02-15 15:41:41 +00:00
Claire Kuang fc5a7c680e Update AutomateFunction.cs
build and deploy Speckle functions / publish-automate-function-version (push) Has been cancelled
2024-02-07 14:26:55 +00:00
Claire Kuang 5569c0d4fd Update AutomateFunction.cs
build and deploy Speckle functions / publish-automate-function-version (push) Has been cancelled
2024-02-07 14:20:32 +00:00
2 changed files with 32 additions and 15 deletions
+1
View File
@@ -34,3 +34,4 @@ jobs:
speckle_token: ${{ secrets.SPECKLE_FUNCTION_TOKEN }}
speckle_function_id: ${{ secrets.SPECKLE_FUNCTION_ID }}
speckle_function_input_schema_file_path: ${{ env.FUNCTION_SCHEMA_FILE_NAME }}
speckle_function_recommended_memory_mi: 8000
@@ -247,11 +247,14 @@ public static class AutomateFunction
);
}
automationContext.AttachErrorToObjects(
"ADDED",
addedAppIdObjects.Select(o => o.Item1),
"added objects with an application Id"
);
if (addedAppIdObjects.Count > 0)
{
automationContext.AttachErrorToObjects(
"ADDED",
addedAppIdObjects.Select(o => o.Item1),
"added objects with an application Id"
);
}
foreach (var deleted in deletedAppIdObjects)
{
@@ -260,22 +263,35 @@ public static class AutomateFunction
);
}
automationContext.AttachErrorToObjects(
"MODIFIED",
modifiedAppIdObjects.Select(o => o.Item1),
"modified objects with an application Id"
);
foreach (var modified in modifiedAppIdObjects)
{
Console.WriteLine(
$"{MODIFIED} {modified.Item3} object: id( {modified.Item1} ), appId: {modified.Item2}, category: {modified.Item4}"
);
}
if (modifiedAppIdObjects.Count > 0)
{
automationContext.AttachErrorToObjects(
"MODIFIED",
modifiedAppIdObjects.Select(o => o.Item1),
"modified objects with an application Id"
);
}
foreach (var changed in changedSpeckleIdObjects)
{
Console.WriteLine($"CHANGED {changed.Item2} object: id( {changed.Item1} )");
}
automationContext.AttachErrorToObjects(
"CHANGED",
changedSpeckleIdObjects.Select(o => o.Item1),
"changed objects with no application Id"
);
if (changedSpeckleIdObjects.Count > 0)
{
automationContext.AttachErrorToObjects(
"CHANGED",
changedSpeckleIdObjects.Select(o => o.Item1),
"changed objects with no application Id"
);
}
}
}
}