From e1dcc307bf50fe4069aeb43a611ddfdb51caafc2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1s=C3=A1ry=20D=C3=A1niel?= Date: Wed, 8 Nov 2017 16:32:00 +0000 Subject: [PATCH] git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube;C30704 --- client/Maestro/Commons/MorpheusXML.cs | 42 ++++++++++++++ .../Configuration/ConfigurationInfo.cs | 12 +++- .../Configuration/configuration-editor.json | 6 +- .../Configuration/configuration-nle.json | 8 +-- .../configuration-playout-ingest.json | 38 ++++++++++-- .../Configuration/configuration-playout.json | 3 +- .../Configuration/configuration-studio.json | 4 +- .../Configuration/configuration-sxs.json | 6 +- client/Maestro/Configuration/global.json | 3 + client/Maestro/Maestro.csproj | 5 ++ client/Maestro/MaestroForm.Designer.cs | 2 +- client/Maestro/MaestroForm.Metadata.cs | 5 +- client/Maestro/MaestroForm.Target.cs | 2 +- client/Maestro/Metadata/ArchiveMetadata.cs | 1 + client/Maestro/Program.cs | 58 ++++++++++++++----- client/Maestro/Targets/UNCTargetProcessor.cs | 19 +++++- .../TrafficIDSelector.Designer.cs | 1 + client/PlanAIRClient/Workers/PromoWorker.cs | 4 +- server/-configuration/scheduledjobs.json | 8 +-- server/-product/DEPLOY-README.txt | 6 +- .../deploy-steps-to-bsh.bat | 5 +- .../CheckMORPHEUSMissingMaterialsStep.java | 7 ++- .../octopus/test/OctopusDataMinerTest.java | 1 + .../jobengine/server/JobStepExecutor.java | 1 + .../user/jobengine/server/steps/JobStep.java | 2 +- 25 files changed, 194 insertions(+), 55 deletions(-) create mode 100644 client/Maestro/Commons/MorpheusXML.cs create mode 100644 client/Maestro/Configuration/global.json diff --git a/client/Maestro/Commons/MorpheusXML.cs b/client/Maestro/Commons/MorpheusXML.cs new file mode 100644 index 00000000..cc059cf6 --- /dev/null +++ b/client/Maestro/Commons/MorpheusXML.cs @@ -0,0 +1,42 @@ +using System; +using System.IO; +using System.Text; +using System.Xml; + +/* + + + 02-02-2018 + TEST TEST + AGENT AGENT + +*/ +namespace Commons { + + public class MorpheusXML { + public static string ToXML(string fileName, DateTime? killDate, string description, string agency) { + if (String.IsNullOrEmpty(fileName)) + throw new NullReferenceException("Hiányzik a cél állomány neve."); + + string result = null; + XmlDocument doc = new XmlDocument(); + XmlElement rootElement = (XmlElement)doc.AppendChild(doc.CreateElement("ID")); + rootElement.SetAttribute("extendedId", fileName); + if (killDate != null) + rootElement.AppendChild(doc.CreateElement("KillDate")).InnerText = ((DateTime)killDate).ToString("MM-dd-yyyy"); + if (!String.IsNullOrEmpty(description)) + rootElement.AppendChild(doc.CreateElement("ExtendedDescription")).InnerText = description; + if (!String.IsNullOrEmpty(agency)) + rootElement.AppendChild(doc.CreateElement("ExtendedAgency")).InnerText = agency; + + XmlWriterSettings settings = new XmlWriterSettings(); + settings.Indent = true; + StringBuilder ms = new StringBuilder(); + XmlWriter writer = XmlWriter.Create(ms, settings); + doc.Save(writer); + result = ms.ToString(); + return result; + } + } + +} \ No newline at end of file diff --git a/client/Maestro/Configuration/ConfigurationInfo.cs b/client/Maestro/Configuration/ConfigurationInfo.cs index 420f6e4b..185f71c6 100644 --- a/client/Maestro/Configuration/ConfigurationInfo.cs +++ b/client/Maestro/Configuration/ConfigurationInfo.cs @@ -7,7 +7,7 @@ using System.IO; namespace Maestro.Configuration { public class Loader { - public static ConfigurationInfo Get(string fileName) { + public static T Get(string fileName) { string configuration = File.ReadAllText(fileName); KnownTypesBinder knownTypesBinder = new KnownTypesBinder { KnownTypes = new List { typeof(UNCSource), typeof(NEXIOSource), typeof(OctopusMetadata), typeof(TrafficMetadata), typeof(MediaCubeMetadata), } @@ -18,14 +18,19 @@ namespace Maestro.Configuration { //Converters = { new KeysJsonConverter() } }; - return JsonConvert.DeserializeObject(configuration, settings); + return JsonConvert.DeserializeObject(configuration, settings); } } + public class GlobalInfo { + public string UserDomain { get; set; } + } + public class ConfigurationInfo { public bool StartInTray { get; set; } public bool Active { get; set; } public string Title { get; set; } + public string UserDomain { get; set; } public Player Player { get; set; } public Source Source { get; set; } public bool EnableCustomMetadataId { get; set; } @@ -58,7 +63,8 @@ namespace Maestro.Configuration { public bool SaveSegments { get; set; } public bool CreateSubFolder { get; set; } public string Tag { get; set; } - public bool SaveMetadata {get; set;} + public bool SaveArchiveMetadata { get; set; } + public bool SaveMorpheusMetadata { get; set; } public bool DisableFileVersioning { get; set; } public bool SendEmailOnError { get; set; } public string ErrorEmailRecipient { get; set; } diff --git a/client/Maestro/Configuration/configuration-editor.json b/client/Maestro/Configuration/configuration-editor.json index fee8893a..72689711 100644 --- a/client/Maestro/Configuration/configuration-editor.json +++ b/client/Maestro/Configuration/configuration-editor.json @@ -48,7 +48,7 @@ "tag": "Betöltés", "createSubFolder": true, "killDateDays": 7, - "saveMetadata": false, + "saveArchiveMetadata": false, "remote": { "address": "ftp://10.10.1.100/OCTOPUS", "userName": "mediacube", @@ -63,7 +63,7 @@ "tag": "Betöltés", "createSubFolder": true, "killDateDays": 7, - "saveMetadata": false, + "saveArchiveMetadata": false, "remote": { "address": "ftp://10.10.1.100/PLAYOUT_NLE", "userName": "mediacube", @@ -106,7 +106,7 @@ "processor": "FTPTargetProcessor", "outputFormat": "%ID%", "tag": "Archiválás", - "saveMetadata": true, + "saveArchiveMetadata": true, "remote": { "address": "ftp://10.10.1.100/ARCHIVE", "userName": "mediacube", diff --git a/client/Maestro/Configuration/configuration-nle.json b/client/Maestro/Configuration/configuration-nle.json index c94c4bd2..c8b6f576 100644 --- a/client/Maestro/Configuration/configuration-nle.json +++ b/client/Maestro/Configuration/configuration-nle.json @@ -1,7 +1,7 @@ { "title": "NLE", "active": false, - "startInTray": true, + "startInTray": false, "enableCustomMetadataId": true, "player": { "enabled": true, @@ -48,7 +48,7 @@ "tag": "Betöltés", "createSubFolder": true, "killDateDays": 7, - "saveMetadata": false, + "saveArchiveMetadata": false, "remote": { "address": "ftp://10.10.1.100/OCTOPUS", "userName": "mediacube", @@ -63,7 +63,7 @@ "tag": "Betöltés", "createSubFolder": true, "killDateDays": 7, - "saveMetadata": false, + "saveArchiveMetadata": false, "remote": { "address": "ftp://10.10.1.100/PLAYOUT_NLE", "userName": "mediacube", @@ -105,7 +105,7 @@ "processor": "FTPTargetProcessor", "outputFormat": "%ID%", "tag": "Archiválás", - "saveMetadata": true, + "saveArchiveMetadata": true, "remote": { "address": "ftp://10.10.1.100/ARCHIVE", "userName": "mediacube", diff --git a/client/Maestro/Configuration/configuration-playout-ingest.json b/client/Maestro/Configuration/configuration-playout-ingest.json index bc80861d..59c90388 100644 --- a/client/Maestro/Configuration/configuration-playout-ingest.json +++ b/client/Maestro/Configuration/configuration-playout-ingest.json @@ -1,6 +1,6 @@ { "title": "Lebony betöltő", - "active": true, + "active": false, "startInTray": false, "enableCustomMetadataId": true, "player": { @@ -12,13 +12,13 @@ "$type": "UNCSource", "filter": "avi,wav,mxf", "local": { - "address": "file://10.10.1.100/BRAAVOS/ARCHIVE", + "address": "file://10.10.1.100/BRAAVOS/READY", "userName": "mediacube", "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy", "timeout": 1000 }, "remote": { - "address": "ftp://10.10.1.100/ARCHIVE", + "address": "ftp://10.10.1.100/READY", "userName": "mediacube", "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy", "timeout": 1000 @@ -50,12 +50,42 @@ "saveSegments": true, "tag": "Adáskész", "disableFileVersioning": true, + "saveMorpheusMetadata": true, "remote": { - "address": "ftp://10.10.1.100/PLAYOUT/IceGateway", + "address": "ftp://10.10.1.100/PLAYOUT/IceGateway/Input", + "userName": "mediacube", + "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy", + "timeout": 1000 + } + }, + { + "label": "X Adáskész", + "processor": "FXPTargetProcessor", + "outputFormat": "%ID%", + "saveSegments": false, + "tag": "XAdáskész", + "disableFileVersioning": false, + "saveMorpheusMetadata": true, + "remote": { + "address": "ftp://10.10.1.100/PLAYOUT/IceGateway/Input", + "userName": "mediacube", + "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy", + "timeout": 1000 + } + }, + { + "label": "Archiválás", + "processor": "FXPTargetProcessor", + "outputFormat": "%ID%", + "tag": "Archiválás", + "saveArchiveMetadata": true, + "remote": { + "address": "ftp://10.10.1.100/ARCHIVE", "userName": "mediacube", "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy", "timeout": 1000 } } + ] } diff --git a/client/Maestro/Configuration/configuration-playout.json b/client/Maestro/Configuration/configuration-playout.json index 9a542e42..ef45e6c7 100644 --- a/client/Maestro/Configuration/configuration-playout.json +++ b/client/Maestro/Configuration/configuration-playout.json @@ -55,6 +55,7 @@ "outputFormat": "%ID%", "saveSegments": true, "tag": "Adáskész", + "reference": "Archiválás", "remote": { "address": "ftp://10.10.1.100/PLAYOUT/IceGateway", "userName": "mediacube", @@ -83,7 +84,7 @@ "processor": "FXPTargetProcessor", "outputFormat": "%ID%", "tag": "Archiválás", - "saveMetadata": true, + "saveArchiveMetadata": true, "remote": { "address": "ftp://10.10.1.100/ARCHIVE", "userName": "mediacube", diff --git a/client/Maestro/Configuration/configuration-studio.json b/client/Maestro/Configuration/configuration-studio.json index d832d94b..b2c132d0 100644 --- a/client/Maestro/Configuration/configuration-studio.json +++ b/client/Maestro/Configuration/configuration-studio.json @@ -1,6 +1,6 @@ { "title": "Stúdió", - "active": true, + "active": false, "startInTray": false, "enableCustomMetadataId": true, "filter": "avi", @@ -62,7 +62,7 @@ "processor": "FXPTargetProcessor", "outputFormat": "%ID%", "tag": "Archiválás", - "createMetadata": true, + "saveArchiveMetadata": true, "remote": { "address": "ftp://10.10.1.100:21/ARCHIVE", "userName": "mediacube", diff --git a/client/Maestro/Configuration/configuration-sxs.json b/client/Maestro/Configuration/configuration-sxs.json index 37437d74..99e07e9f 100644 --- a/client/Maestro/Configuration/configuration-sxs.json +++ b/client/Maestro/Configuration/configuration-sxs.json @@ -48,7 +48,7 @@ "tag": "Betöltés", "createSubFolder": true, "killDateDays": 7, - "saveMetadata": false, + "saveArchiveMetadata": false, "remote": { "address": "file://10.10.1.100/BRAAVOS/OCTOPUS", "userName": "mediacube", @@ -63,7 +63,7 @@ "tag": "Betöltés", "createSubFolder": true, "killDateDays": 7, - "saveMetadata": false, + "saveArchiveMetadata": false, "remote": { "address": "file://10.10.1.100/BRAAVOS/PLAYOUT_NLE", "userName": "mediacube", @@ -89,7 +89,7 @@ "processor": "UNCTargetProcessor", "outputFormat": "%ID%", "tag": "Archiválás", - "saveMetadata": true, + "saveArchiveMetadata": true, "remote": { "address": "file://10.10.1.100/BRAAVOS/ARCHIVE", "userName": "mediacube", diff --git a/client/Maestro/Configuration/global.json b/client/Maestro/Configuration/global.json new file mode 100644 index 00000000..aa5d8afc --- /dev/null +++ b/client/Maestro/Configuration/global.json @@ -0,0 +1,3 @@ +{ + "userDomain": "intra.echotv.hu" +} diff --git a/client/Maestro/Maestro.csproj b/client/Maestro/Maestro.csproj index 975da184..88c783c0 100644 --- a/client/Maestro/Maestro.csproj +++ b/client/Maestro/Maestro.csproj @@ -144,6 +144,7 @@ + @@ -163,6 +164,7 @@ ArchiveMetadataForm.cs + @@ -248,6 +250,9 @@ Form + + PreserveNewest + PreserveNewest diff --git a/client/Maestro/MaestroForm.Designer.cs b/client/Maestro/MaestroForm.Designer.cs index 6c96477d..229d1128 100644 --- a/client/Maestro/MaestroForm.Designer.cs +++ b/client/Maestro/MaestroForm.Designer.cs @@ -320,7 +320,7 @@ namespace Maestro { this.ctxiModifyArchiveMetadata.Name = "ctxiModifyArchiveMetadata"; this.ctxiModifyArchiveMetadata.Size = new System.Drawing.Size(206, 22); this.ctxiModifyArchiveMetadata.Text = "Modify archive metadata"; - this.ctxiModifyArchiveMetadata.Click += new System.EventHandler(this.ModifyArchiveMetadataClick); + this.ctxiModifyArchiveMetadata.Click += new System.EventHandler(this.OnArchiveMetadataClick); // // splitContainer1 // diff --git a/client/Maestro/MaestroForm.Metadata.cs b/client/Maestro/MaestroForm.Metadata.cs index 0606f555..4a8e1481 100644 --- a/client/Maestro/MaestroForm.Metadata.cs +++ b/client/Maestro/MaestroForm.Metadata.cs @@ -88,7 +88,7 @@ namespace Maestro { mediaCubeApi = new MediaCubeApi(metadata.Server.Address.ToString(), metadata.Server.UserName, metadata.Server.Password, metadata.Server.Timeout, errorMessageBus); } - private void ModifyArchiveMetadataClick(object sender, EventArgs e) { + private void OnArchiveMetadataClick(object sender, EventArgs e) { if (archiveMetadata == null) archiveMetadata = GetArchiveMetadata(); ArchiveMetadataForm form = new ArchiveMetadataForm(archiveMetadata); @@ -200,6 +200,8 @@ namespace Maestro { result = GetOctopusMetadata(); break; case MetadataType.TrafficMaterial: + case MetadataType.TrafficPromo: + case MetadataType.TrafficAD: result = GetTrafficMetadata(metadataType); break; } @@ -364,7 +366,6 @@ namespace Maestro { } private void UpdateEditArchiveMetadataEnabled() { - // ctxiModifyArchiveMetadata.Enabled = !String.IsNullOrEmpty(textSelectedMetadata.Text); ctxiModifyArchiveMetadata.Enabled = SelectedSource != null; } diff --git a/client/Maestro/MaestroForm.Target.cs b/client/Maestro/MaestroForm.Target.cs index 73764e89..49cf6a0b 100644 --- a/client/Maestro/MaestroForm.Target.cs +++ b/client/Maestro/MaestroForm.Target.cs @@ -132,7 +132,7 @@ namespace Maestro { } private bool EnsureMetadata(Target target) { - if (target.SaveMetadata && (archiveMetadata == null || !archiveMetadata.IsFilled)) { + if ((target.SaveArchiveMetadata || target.SaveMorpheusMetadata) && (archiveMetadata == null || !archiveMetadata.IsFilled)) { archiveMetadata = GetArchiveMetadata(); if (archiveMetadata == null) { MessageBox.Show(String.Format("A {0} folyamat nem futtatható kísérő adatok nélkül.", target.Label)); diff --git a/client/Maestro/Metadata/ArchiveMetadata.cs b/client/Maestro/Metadata/ArchiveMetadata.cs index d3a4d138..b245a294 100644 --- a/client/Maestro/Metadata/ArchiveMetadata.cs +++ b/client/Maestro/Metadata/ArchiveMetadata.cs @@ -22,6 +22,7 @@ namespace Maestro.Metadata { // StuffID, StuffTitle, StuffDescription, MediaID, MediaTitle, MediaDescription); } + [JsonIgnore] public bool IsFilled { get { return diff --git a/client/Maestro/Program.cs b/client/Maestro/Program.cs index 9f1ab25f..4efd52ab 100644 --- a/client/Maestro/Program.cs +++ b/client/Maestro/Program.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics; +using System.DirectoryServices.AccountManagement; using System.Drawing; using System.IO; using System.Linq; @@ -48,16 +49,22 @@ namespace Maestro { } finally { if (hasHandle) { + TrayApplicationContext context = null; try { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); - Application.Run(new TrayApplicationContext()); + context = new TrayApplicationContext(); + context.Start(); + Application.Run(context); } catch (Exception e) { Debug.WriteLine(e.Message); + MessageBox.Show(new Form() { TopMost = true }, "Nincs aktív konfiguráció!"); } finally { mutex.ReleaseMutex(); + if (context != null) + context.Stop(); } } } @@ -69,13 +76,20 @@ namespace Maestro { } public class TrayApplicationContext : ApplicationContext { + private const string GLOBAL_JSON = "global.json"; + private const string JSON_WILDCARD = "*.json"; + private const string CONFIG_ERROR = "Nincs aktív konfiguráció!"; + private const string SYSCONFIG_ERROR = "Nincs rendszer konfiguráció!"; + private const string CONFIGURATION_FOLDER = "./Configuration"; private static Logger logger = LogManager.GetCurrentClassLogger(); private NotifyIcon trayIcon; private ConcurrentBag forms = new ConcurrentBag(); private IMessageBus messageBus = new MessageBus(); public TrayApplicationContext() { + } + public void Start() { String[] arguments = Environment.GetCommandLineArgs(); if (!arguments.ToList().Contains("nosplash")) { Splash splash = new Splash(); @@ -83,28 +97,42 @@ namespace Maestro { Application.Run(splash); }); } - CreateForms(); CreateTrayIcon(); + CreateForms(); } private void CreateForms() { - string[] files = Directory.GetFiles("./Configuration", "*.json"); - if (files.Length == 0) { - MessageBox.Show(new Form() { TopMost = true }, "Nincs aktív konfiguráció!"); - TerminateApplication(); - } + string[] files = Directory.GetFiles(CONFIGURATION_FOLDER, JSON_WILDCARD); + if (files.Length == 0) + throw new Exception(CONFIG_ERROR); + + CheckGlobalConfig(files); foreach (String file in files) { CreateForm(file); } - if (forms.Count == 0) { - MessageBox.Show(new Form() { TopMost = true }, "Nincs aktív konfiguráció!"); - TerminateApplication(); - } + if (forms.Count == 0) + throw new Exception(CONFIG_ERROR); + } + + private void CheckGlobalConfig(string[] files) { + string globalFile = Path.Combine(CONFIGURATION_FOLDER, GLOBAL_JSON); + if (files.Contains(globalFile)) { + GlobalInfo global = Loader.Get(globalFile); + if (String.IsNullOrEmpty(global.UserDomain)) + throw new Exception(SYSCONFIG_ERROR); + else { + //using (PrincipalContext pc = new PrincipalContext(ContextType.Domain, global.UserDomain)) { + // bool isValid = pc.ValidateCredentials("echotest", "aA123456+"); + // Debug.WriteLine("User valid: " + isValid); + //} + } + } else + throw new Exception(SYSCONFIG_ERROR); } private void CreateForm(string file) { try { - ConfigurationInfo config = Loader.Get(file); + ConfigurationInfo config = Loader.Get(file); if (!config.Active) return; ApplyCommandLineParameters(ref config); @@ -198,10 +226,11 @@ namespace Maestro { } void Exit(object sender, EventArgs e) { - TerminateApplication(); + Stop(); + Application.Exit(); } - private void TerminateApplication() { + public void Stop() { foreach (MeastroFormNotifyIcon form in forms) { form.CloseForm(); } @@ -209,7 +238,6 @@ namespace Maestro { trayIcon.Visible = false; trayIcon.Dispose(); } - Application.Exit(); } } } diff --git a/client/Maestro/Targets/UNCTargetProcessor.cs b/client/Maestro/Targets/UNCTargetProcessor.cs index b3d4e246..c260c51a 100644 --- a/client/Maestro/Targets/UNCTargetProcessor.cs +++ b/client/Maestro/Targets/UNCTargetProcessor.cs @@ -107,8 +107,10 @@ namespace Maestro.Targets { UploadKillDateFile(); } - if (parameters.TargetConfig.SaveMetadata && parameters.ArchiveMetadata != null) - CreateMetadata(); + if (parameters.TargetConfig.SaveArchiveMetadata && parameters.ArchiveMetadata != null) + CreateArchiveMetadata(); + if (parameters.TargetConfig.SaveMorpheusMetadata && parameters.ArchiveMetadata != null) + CreateArchiveMetadata(); if (parameters.TargetConfig.SaveSegments && parameters.Segments != null) //eljuthat-e ide a felhasználó, ha a MetadataKind octopus? parameters.TrafficApi.UpdateTrafficInformation(parameters.VariantID, true, (TrafficMetadataType)parameters.MetadataKind, parameters.Segments); @@ -194,7 +196,18 @@ namespace Maestro.Targets { KillDate = date.ToString("yyyy.MM.dd"); } - private void CreateMetadata() { + private void CreateArchiveMetadata() { + Uri address = parameters.TargetConfig.Remote.Address; + string statusWorkDir = Path.Combine(workingDir, STATUS_FOLDER); + EnsureDirectoryExistence(statusWorkDir); + string fileName = String.Format(METADATA_FILE, OutputName); + logger.Debug("Creating METADATA file {0}", fileName); + byte[] content = Encoding.UTF8.GetBytes(parameters.ArchiveMetadata.ToString()); + string ouputPath = GetOutputFilePath(statusWorkDir, fileName); + UploadContent(ouputPath, content); + } + + private void CreateTrafficMetadata() { Uri address = parameters.TargetConfig.Remote.Address; string statusWorkDir = Path.Combine(workingDir, STATUS_FOLDER); EnsureDirectoryExistence(statusWorkDir); diff --git a/client/PlanAIRClient/TrafficIDSelector.Designer.cs b/client/PlanAIRClient/TrafficIDSelector.Designer.cs index 1da65be5..5e8fd479 100644 --- a/client/PlanAIRClient/TrafficIDSelector.Designer.cs +++ b/client/PlanAIRClient/TrafficIDSelector.Designer.cs @@ -217,6 +217,7 @@ this.chkProblematic.TabIndex = 7; this.chkProblematic.Text = "Missing copia"; this.chkProblematic.UseVisualStyleBackColor = true; + this.chkProblematic.CheckedChanged += new System.EventHandler(this.OnTypeFilterChanged); // // pSearch // diff --git a/client/PlanAIRClient/Workers/PromoWorker.cs b/client/PlanAIRClient/Workers/PromoWorker.cs index 40ebd35e..e0133a67 100644 --- a/client/PlanAIRClient/Workers/PromoWorker.cs +++ b/client/PlanAIRClient/Workers/PromoWorker.cs @@ -104,8 +104,8 @@ namespace TrafficClient.Workers { TryConnect(); using (SqlCommand cmd = new SqlCommand("dbo.clIFsp_EC_MAM", connection)) { cmd.CommandType = CommandType.StoredProcedure; - cmd.Parameters.AddWithValue("@Operation", 2001); - cmd.Parameters.AddWithValue("@@@Options", 40); + cmd.Parameters.AddWithValue("@Operation", 2002); + cmd.Parameters.AddWithValue("@@@Options", 0); cmd.Parameters.AddWithValue("@@ItemID", DBNull.Value); cmd.Parameters.AddWithValue("@@StrParam1", strParam); using (SqlDataReader reader = cmd.ExecuteReader()) { diff --git a/server/-configuration/scheduledjobs.json b/server/-configuration/scheduledjobs.json index 410e2004..d6ab42dc 100644 --- a/server/-configuration/scheduledjobs.json +++ b/server/-configuration/scheduledjobs.json @@ -24,7 +24,7 @@ {"name": "userName", "value": "MAM", "type": "java.lang.String"}, {"name": "password", "value": "Echotv.hu", "type": "java.lang.String"}, {"name": "lookupDays", "value": 7, "type": "java.lang.Integer"}, - {"name": "targetPath", "value": "\\\\10.10.1.100\\BRAAVOS\\PLAYOUT", "type": "java.lang.String"}, + {"name": "targetPath", "value": "/mnt/ISILON/PLAYOUT/IceGateway/Input", "type": "java.lang.String"}, {"name": "killDateDays", "value": 10, "type": "java.lang.Integer"} ] }, @@ -35,8 +35,8 @@ "executeimmediate": true, "cronexpression": "0 0 0/1 1/1 * ? *", "parameters": [ - {"name": "sourcePath", "value": "\\\\10.10.1.100\\BRAAVOS\\PLAYOUT\\MORPHEUS", "type": "java.lang.String"}, - {"name": "targetPath", "value": "\\\\10.10.1.100\\BRAAVOS\\PLAYOUT", "type": "java.lang.String"}, + {"name": "sourcePath", "value": "/mnt/MORPHEUS", "type": "java.lang.String"}, + {"name": "targetPath", "value": "/mnt/ISILON/PLAYOUT/IceGateway/Input", "type": "java.lang.String"}, {"name": "killDateDays", "value": 10, "type": "java.lang.Integer"} ] }, @@ -66,7 +66,7 @@ ] }, { - "active": false, + "active": true, "name" : "OCTOPUS adatok szinkronizálása", "template": "sync-octopus.xml", "executeimmediate": true, diff --git a/server/-product/DEPLOY-README.txt b/server/-product/DEPLOY-README.txt index 55304477..828a20c6 100644 --- a/server/-product/DEPLOY-README.txt +++ b/server/-product/DEPLOY-README.txt @@ -72,9 +72,13 @@ Windows mapping Selenio ------- - mount -t cifs -o username=root,password=Broadca5T //10.10.1.71/Data/Output/MP4_H264_AAC + mount -t cifs -o username=root,password=Broadca5T //10.10.1.71/Data/Output/MP4_H264_AAC /mnt/SELENIO +Morpheus +------- + mount -t cifs -o username=SAM,password=sam //192.168.100.91/MissingMaterial /mnt/MORPHEUS + MediaCube --------- Schedule diff --git a/server/user.jobengine.executors/deploy-steps-to-bsh.bat b/server/user.jobengine.executors/deploy-steps-to-bsh.bat index 2acba7d3..77ff5dd3 100644 --- a/server/user.jobengine.executors/deploy-steps-to-bsh.bat +++ b/server/user.jobengine.executors/deploy-steps-to-bsh.bat @@ -1,8 +1,8 @@ @ECHO OFF -SET REMOTE_HOST=10.10.1.28 +SET REMOTE_HOST=10.10.1.27 SET REMOTE_LOCATION=/opt/mediacube/configuration/executors -SET REMOTE_SERVER_HOSTKEY=ssh-rsa 2048 7e:0a:bb:8b:38:0f:22:c3:81:d4:1a:44:f3:91:ea:1f +SET REMOTE_SERVER_HOSTKEY=ssh-ed25519 256 ea:ab:67:70:79:63:2f:6a:34:81:48:e2:b9:dd:ca:d4 SET REMOTE_SERVER_ADDRESS=scp://root:password@%REMOTE_HOST% SET LOCAL_STEPS_LOCATION=bin/user/jobengine/server/steps SET LOCAL_CONFIG_LOCATION=config @@ -22,6 +22,7 @@ SET LOCAL_CONFIG_LOCATION=config "lcd ..\" ^ "lcd %LOCAL_CONFIG_LOCATION%" ^ "synchronize remote -filemask=config.xml" ^ + "call pcs resource restart mediacube_script" ^ "exit" ECHO *** Completed *** diff --git a/server/user.jobengine.executors/src/user/jobengine/server/steps/CheckMORPHEUSMissingMaterialsStep.java b/server/user.jobengine.executors/src/user/jobengine/server/steps/CheckMORPHEUSMissingMaterialsStep.java index 843b2734..0e9d301d 100644 --- a/server/user.jobengine.executors/src/user/jobengine/server/steps/CheckMORPHEUSMissingMaterialsStep.java +++ b/server/user.jobengine.executors/src/user/jobengine/server/steps/CheckMORPHEUSMissingMaterialsStep.java @@ -32,6 +32,7 @@ public class CheckMORPHEUSMissingMaterialsStep extends JobStep { private static final String MEDIACUBEMEDIA = "mediaCubeMedia"; private static final String JOBTEMPLATE = "retrieve-material.xml"; private static final String CSV_EXT = ".csv"; + private static final String MXF_EXT = ".MXF"; private String targetPath; private MediaFileDAO dao; private IJobEngine jobEngine; @@ -69,8 +70,8 @@ public class CheckMORPHEUSMissingMaterialsStep extends JobStep { return; } - jobEngine.submit(JOBTEMPLATE, RETRIEVE_MATERIAL, ListUtils.asMap(MEDIACUBEMEDIA, medias.get(0), TARGETPATH, targetPath, TARGETNAMEPATTERN, "%s", - SUCCESSRECIPIENT, null, KILLDATEDAYS, killDateDays)); + jobEngine.submit(JOBTEMPLATE, RETRIEVE_MATERIAL, ListUtils.asMap(MEDIACUBEMEDIA, medias.get(0), TARGETPATH, targetPath, TARGETNAMEPATTERN, + mediaId + MXF_EXT, SUCCESSRECIPIENT, null, KILLDATEDAYS, killDateDays)); } private void processMissingMaterialCSV(Path csvFilePath) throws Exception { @@ -84,7 +85,7 @@ public class CheckMORPHEUSMissingMaterialsStep extends JobStep { String line = lines.get(i); if (line == null) continue; - String[] data = line.split("\\t"); + String[] data = line.split(","); if (i == 0) { //Channel,Time to Air,Duration,Material ID,Title,Device ID,Reason, List dataList = Arrays.asList(data); diff --git a/server/user.jobengine.osgi.commons/test/user/common/octopus/test/OctopusDataMinerTest.java b/server/user.jobengine.osgi.commons/test/user/common/octopus/test/OctopusDataMinerTest.java index da8d37cb..96eac917 100644 --- a/server/user.jobengine.osgi.commons/test/user/common/octopus/test/OctopusDataMinerTest.java +++ b/server/user.jobengine.osgi.commons/test/user/common/octopus/test/OctopusDataMinerTest.java @@ -131,4 +131,5 @@ public class OctopusDataMinerTest { } } } + } diff --git a/server/user.jobengine.osgi.server/src/user/jobengine/server/JobStepExecutor.java b/server/user.jobengine.osgi.server/src/user/jobengine/server/JobStepExecutor.java index b9544737..7ecf7cbb 100644 --- a/server/user.jobengine.osgi.server/src/user/jobengine/server/JobStepExecutor.java +++ b/server/user.jobengine.osgi.server/src/user/jobengine/server/JobStepExecutor.java @@ -205,6 +205,7 @@ public class JobStepExecutor implements IJobStepExecutor { @Override public void submit(IJobRuntime jobRuntime) { queue.put(jobRuntime); + jobRuntime.setDescription(stepClass.getSimpleName()); logger.info("Executor got ! {}", jobRuntime); } diff --git a/server/user.jobengine.osgi.server/src/user/jobengine/server/steps/JobStep.java b/server/user.jobengine.osgi.server/src/user/jobengine/server/steps/JobStep.java index 28806e12..fe70ad8e 100644 --- a/server/user.jobengine.osgi.server/src/user/jobengine/server/steps/JobStep.java +++ b/server/user.jobengine.osgi.server/src/user/jobengine/server/steps/JobStep.java @@ -55,7 +55,7 @@ public class JobStep implements IJobStep { public Object[] run(IJobEngine jobEngine, IJobRuntime jobRuntime, Object[] inputs) throws Exception { Object[] result = null; this.jobRuntime = jobRuntime; - jobRuntime.setDescription("Feldolgozás: " + getClass().getSimpleName()); + //jobRuntime.setDescription("Feldolgozás: " + getClass().getSimpleName()); jobRuntime.NotifyUpdate(); for (Method method : getClass().getDeclaredMethods()) { Annotation annotation = method.getAnnotation(StepEntry.class); -- 2.54.0