File tree Expand file tree Collapse file tree 2 files changed +47
-1
lines changed
src/WebJobs.Script.WebHost Expand file tree Collapse file tree 2 files changed +47
-1
lines changed Original file line number Diff line number Diff line change @@ -402,7 +402,21 @@ public async Task<IActionResult> SyncTriggers()
402
402
public IActionResult Restart ( [ FromServices ] IScriptHostManager hostManager )
403
403
{
404
404
Task ignore = hostManager . RestartHostAsync ( ) ;
405
- return Ok ( _applicationHostOptions . Value ) ;
405
+
406
+ var hostOptionsValue = _applicationHostOptions . Value ;
407
+ var response = new HostRestartResponse ( )
408
+ {
409
+ IsFileSystemReadOnly = hostOptionsValue . IsFileSystemReadOnly ,
410
+ IsScmRunFromPackage = hostOptionsValue . IsScmRunFromPackage ,
411
+ IsSelfHost = hostOptionsValue . IsSelfHost ,
412
+ HasParentScope = hostOptionsValue . HasParentScope ,
413
+ LogPath = hostOptionsValue . LogPath ,
414
+ ScriptPath = hostOptionsValue . ScriptPath ,
415
+ SecretsPath = hostOptionsValue . SecretsPath ,
416
+ TestDataPath = hostOptionsValue . TestDataPath
417
+ } ;
418
+
419
+ return Ok ( response ) ;
406
420
}
407
421
408
422
/// <summary>
Original file line number Diff line number Diff line change
1
+ // Copyright (c) .NET Foundation. All rights reserved.
2
+ // Licensed under the MIT License. See License.txt in the project root for license information.
3
+
4
+ using System ;
5
+
6
+ /// <summary>
7
+ /// The model used for the response message in 'admin/host/restart' API endpoint.
8
+ /// This contains all the properties from <see cref="ScriptApplicationHostOptions"/> excluding the <see cref="IServiceProvider"/> property.
9
+ /// </summary>
10
+ namespace Microsoft . Azure . WebJobs . Script . WebHost . Models
11
+ {
12
+ public class HostRestartResponse
13
+ {
14
+ public bool IsSelfHost { get ; set ; }
15
+
16
+ public string SecretsPath { get ; set ; }
17
+
18
+ public string ScriptPath { get ; set ; }
19
+
20
+ public string LogPath { get ; set ; }
21
+
22
+ public string TestDataPath { get ; set ; }
23
+
24
+ public bool HasParentScope { get ; set ; }
25
+
26
+ public bool IsStandbyConfiguration { get ; set ; }
27
+
28
+ public bool IsFileSystemReadOnly { get ; set ; }
29
+
30
+ public bool IsScmRunFromPackage { get ; set ; }
31
+ }
32
+ }
You can’t perform that action at this time.
0 commit comments