Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

Commit

Permalink
Merge pull request #14 from Autodesk-Forge/dev
Browse files Browse the repository at this point in the history
wait more time for new project setup
  • Loading branch information
JohnOnSoftware authored Oct 19, 2020
2 parents 7de2f36 + ae4b24a commit 075a316
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions BimProjectSetupCLI/BimProjectSetupCLI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@
<None Include="sample\BIM360_ProjectUser_Template.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="sample\BIM360_ProjectUser_UP_Template.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="sample\BIM360_Service_Template.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
Expand All @@ -104,6 +107,9 @@
<None Include="sample\ImportUsers.bat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="sample\UpdateUsers.bat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="sample\ImportServices.bat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
Expand Down
5 changes: 3 additions & 2 deletions BimProjectSetupCommon/Workflows/Folder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -297,14 +297,15 @@ private void CopyProjectFolders(BimProject orgProj, string newProjId, string uid
if (existingRootFolder != null)
{
// Without below, access to the project is forbidden...
Thread.Sleep(3000);
Log.Info("- wait 30 seconds to make sure the new project is successfully setup ... ...");
Thread.Sleep(30000);

// assign permission to root folder first
Log.Info("- assigning role permissions to root folder: " + newRootFolder.attributes.name);
bool res = _foldersApi.AssignPermission(newProjId, newRootFolder.id, existingRootFolder.permissions, uid);
if (!res)
Log.Warn($"Failed to assgn role permissions to root folder: {newRootFolder.attributes.name}.");

Log.Info("- copying the subfolders(including folder permission of role) of root folder: " + newRootFolder.attributes.name);
foreach (NestedFolder childFolder in existingRootFolder.childrenFolders)
{
Expand Down

0 comments on commit 075a316

Please sign in to comment.