Document unavailable after upload and publishing - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

Document unavailable after upload and publishing

  • Document unavailable after upload and publishing
  • I have a thread that checks for a file being uploaded every X. Currently, if the document is not present, then uploaded and published, the call to GetDocuments never returns that document. The only way it shows up through the GetDocuments call is if the application is restarted. Is there a refresh/flush I need to call when accessing the LibrariesManager and GetDocuments call this way?

     

    Example:

    void Foo()
        new Thread(() =>
        
            while (true)
            
                int t = 1000 * 60 * 2;
                Thread.Sleep(t);
     
                var libMngr = LibrariesManager.GetManager();
                var docList = libMngr.GetDocuments()
                    .Where(d => d.Title.Equals("DocumentTitle"));
     
                Log.Write(docList.Count(), ConfigurationPolicy.Debug);
            
        ).Start();