routing - handle when umbraco is not ready or has no content
This commit is contained in:
@@ -36,6 +36,7 @@ namespace Umbraco.Core
|
||||
// note - the original umbraco module checks on content.Instance in umbraco.dll
|
||||
// now, the boot task that setup the content store ensures that it is ready
|
||||
bool _isReady = false;
|
||||
System.Threading.ManualResetEventSlim _isReadyEvent = new System.Threading.ManualResetEventSlim(false);
|
||||
public bool IsReady
|
||||
{
|
||||
get
|
||||
@@ -46,9 +47,15 @@ namespace Umbraco.Core
|
||||
{
|
||||
AssertIsNotReady();
|
||||
_isReady = value;
|
||||
_isReadyEvent.Set();
|
||||
}
|
||||
}
|
||||
|
||||
public bool WaitForReady(int timeout)
|
||||
{
|
||||
return _isReadyEvent.WaitHandle.WaitOne(timeout);
|
||||
}
|
||||
|
||||
|
||||
// notes
|
||||
// GlobalSettings.ConfigurationStatus returns the value that's in the web.config, so it's the "configured version"
|
||||
|
||||
Reference in New Issue
Block a user