aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2024-05-18 20:05:10 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2024-05-18 20:05:10 +0300
commitd91db45c47a1d2d1d050fdafe8f4eb44951a883f (patch)
tree1437e1f0f7ea91dae53e59f7f605a3e603ea3926 /Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs
parentfd061c7cb7f243d562913d496223830bcf83b7a9 (diff)
downloadTango-d91db45c47a1d2d1d050fdafe8f4eb44951a883f.tar.gz
Tango-d91db45c47a1d2d1d050fdafe8f4eb44951a883f.zip
FSE/RSM MachineService Provides full capability.
Diffstat (limited to 'Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs')
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs42
1 files changed, 21 insertions, 21 deletions
diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs
index 9cbc17abf..06b2fd232 100644
--- a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs
+++ b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs
@@ -68,7 +68,7 @@ namespace Tango.MachineService.Controllers
LogManager.Log("Setup request received: " + request.ToString());
- using (ObservablesContext db = ObservablesContextHelper.CreateContext())
+ using (ObservablesContext db = ObservablesWebContext.CreateContext())
{
String machine_guid = RequestToken.Object.MachineGuid;
@@ -177,7 +177,7 @@ namespace Tango.MachineService.Controllers
Task.Factory.StartNew(() =>
{
- using (ObservablesContext b = ObservablesContextHelper.CreateContext())
+ using (ObservablesContext b = ObservablesWebContext.CreateContext())
{
//Reset Job Runs.
try
@@ -216,7 +216,7 @@ namespace Tango.MachineService.Controllers
DownloadUpdateResponse response = new DownloadUpdateResponse();
response.NotifyCompletedToken = Guid.NewGuid().ToString();
- using (ObservablesContext db = ObservablesContextHelper.CreateContext())
+ using (ObservablesContext db = ObservablesWebContext.CreateContext())
{
db.Configuration.LazyLoadingEnabled = false;
String machine_guid = RequestToken.Object.MachineGuid;
@@ -302,7 +302,7 @@ namespace Tango.MachineService.Controllers
{
_pendingUpdates.Remove(pendingUpdate);
- using (ObservablesContext db = ObservablesContextHelper.CreateContext())
+ using (ObservablesContext db = ObservablesWebContext.CreateContext())
{
var tangoUpdate = db.TangoUpdates.SingleOrDefault(x => x.Guid == pendingUpdate.TangoUpdateGuid);
@@ -333,7 +333,7 @@ namespace Tango.MachineService.Controllers
{
CheckForUpdateResponse response = new CheckForUpdateResponse();
- using (ObservablesContext db = ObservablesContextHelper.CreateContext())
+ using (ObservablesContext db = ObservablesWebContext.CreateContext())
{
String machine_guid = RequestToken.Object.MachineGuid;
@@ -435,7 +435,7 @@ namespace Tango.MachineService.Controllers
UpdateDBResponse response = new UpdateDBResponse();
response.NotifyCompletedToken = Guid.NewGuid().ToString();
- using (ObservablesContext db = ObservablesContextHelper.CreateContext())
+ using (ObservablesContext db = ObservablesWebContext.CreateContext())
{
String machine_guid = RequestToken.Object.MachineGuid;
@@ -506,7 +506,7 @@ namespace Tango.MachineService.Controllers
UploadMachineDataResponse response = new UploadMachineDataResponse();
response.NotifyCompletedToken = Guid.NewGuid().ToString();
- using (ObservablesContext db = ObservablesContextHelper.CreateContext())
+ using (ObservablesContext db = ObservablesWebContext.CreateContext())
{
var machine = db.Machines.SingleOrDefault(x => x.Guid == RequestToken.Object.MachineGuid);
@@ -534,7 +534,7 @@ namespace Tango.MachineService.Controllers
try
{
- using (ObservablesContext db = ObservablesContextHelper.CreateContext())
+ using (ObservablesContext db = ObservablesWebContext.CreateContext())
{
var machine = db.Machines.SingleOrDefault(x => x.Guid == RequestToken.Object.MachineGuid);
@@ -547,7 +547,7 @@ namespace Tango.MachineService.Controllers
//Insert/Replace Jobs.
foreach (var dto in request.Jobs)
{
- using (ObservablesContext db = ObservablesContextHelper.CreateContext())
+ using (ObservablesContext db = ObservablesWebContext.CreateContext())
{
try
{
@@ -586,7 +586,7 @@ namespace Tango.MachineService.Controllers
//Insert Update DataStore Items
foreach (var dto in request.DataStoreItems)
{
- using (ObservablesContext db = ObservablesContextHelper.CreateContext())
+ using (ObservablesContext db = ObservablesWebContext.CreateContext())
{
try
{
@@ -626,7 +626,7 @@ namespace Tango.MachineService.Controllers
//Insert JobRuns.
foreach (var dto in request.JobRuns)
{
- using (ObservablesContext db = ObservablesContextHelper.CreateContext())
+ using (ObservablesContext db = ObservablesWebContext.CreateContext())
{
try
{
@@ -654,7 +654,7 @@ namespace Tango.MachineService.Controllers
//Insert TangoUpdates.
foreach (var dto in request.OfflineUpdates)
{
- using (ObservablesContext db = ObservablesContextHelper.CreateContext())
+ using (ObservablesContext db = ObservablesWebContext.CreateContext())
{
try
{
@@ -682,7 +682,7 @@ namespace Tango.MachineService.Controllers
//Insert MachineEvents.
foreach (var dto in request.MachineEvents)
{
- using (ObservablesContext db = ObservablesContextHelper.CreateContext())
+ using (ObservablesContext db = ObservablesWebContext.CreateContext())
{
try
{
@@ -728,7 +728,7 @@ namespace Tango.MachineService.Controllers
{
DownloadMachineDataResponse response = new DownloadMachineDataResponse();
- using (ObservablesContext db = ObservablesContextHelper.CreateContext())
+ using (ObservablesContext db = ObservablesWebContext.CreateContext())
{
var machine = db.Machines.SingleOrDefault(x => x.Guid == RequestToken.Object.MachineGuid);
@@ -795,7 +795,7 @@ namespace Tango.MachineService.Controllers
{
var response = new NotifyMachineDataDownloadCompletedResponse();
- using (ObservablesContext db = ObservablesContextHelper.CreateContext())
+ using (ObservablesContext db = ObservablesWebContext.CreateContext())
{
var machine = db.Machines.SingleOrDefault(x => x.Guid == RequestToken.Object.MachineGuid);
@@ -837,7 +837,7 @@ namespace Tango.MachineService.Controllers
{
LatestVersionResponse response = new LatestVersionResponse();
- using (ObservablesContext db = ObservablesContextHelper.CreateContext())
+ using (ObservablesContext db = ObservablesWebContext.CreateContext())
{
var versions = db.TangoVersions.Where(x => x.MachineVersionGuid == request.MachineVersionGuid && request.Tag == x.Tag).ToList();
@@ -863,7 +863,7 @@ namespace Tango.MachineService.Controllers
{
GetTagsResponse response = new GetTagsResponse();
- using (ObservablesContext db = ObservablesContextHelper.CreateContext())
+ using (ObservablesContext db = ObservablesWebContext.CreateContext())
{
var versions = db.TangoVersions.Where(x => x.MachineVersionGuid == request.MachineVersionGuid).ToList();
@@ -884,7 +884,7 @@ namespace Tango.MachineService.Controllers
{
UploadVersionResponse response = new UploadVersionResponse();
- using (ObservablesContext db = ObservablesContextHelper.CreateContext())
+ using (ObservablesContext db = ObservablesWebContext.CreateContext())
{
//Load relations first...
db.Roles.ToList();
@@ -974,7 +974,7 @@ namespace Tango.MachineService.Controllers
{
_pendingUploads.RemoveAll(x => x.Token == upload.Token);
- using (ObservablesContext db = ObservablesContextHelper.CreateContext())
+ using (ObservablesContext db = ObservablesWebContext.CreateContext())
{
db.TangoVersions.Add(new TangoVersion()
{
@@ -1002,7 +1002,7 @@ namespace Tango.MachineService.Controllers
[HttpPost]
public MachineVersionsResponse GetMachineVersions(MachineVersionsRequest request)
{
- using (var db = ObservablesContextHelper.CreateContext())
+ using (var db = ObservablesWebContext.CreateContext())
{
return new MachineVersionsResponse()
{
@@ -1016,7 +1016,7 @@ namespace Tango.MachineService.Controllers
{
LoginResponse response = new LoginResponse();
- using (ObservablesContext db = ObservablesContextHelper.CreateContext())
+ using (ObservablesContext db = ObservablesWebContext.CreateContext())
{
if (request.Mode == LoginMode.User)
{