From: Vásáry Dániel Date: Mon, 29 Oct 2018 15:56:36 +0000 (+0000) Subject: Bug #99 Targetek végrehajtásának sorrendje esetleges X-Git-Url: http://git.useribm.hu/?a=commitdiff_plain;h=3e78d7b570995d7a87a391b82fc78e35bd70f5d0;p=mediacube.git Bug #99 Targetek végrehajtásának sorrendje esetleges git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube;C31338 --- diff --git a/client/Maestro/Configuration/-UJ-configuration-tqc-check.json b/client/Maestro/Configuration/UJ-configuration-tqc-check.json similarity index 70% rename from client/Maestro/Configuration/-UJ-configuration-tqc-check.json rename to client/Maestro/Configuration/UJ-configuration-tqc-check.json index e8a3d085..7180a0dd 100644 --- a/client/Maestro/Configuration/-UJ-configuration-tqc-check.json +++ b/client/Maestro/Configuration/UJ-configuration-tqc-check.json @@ -1,5 +1,5 @@ { - "title": "TQC check", + "title": "TESZT TQC TESZT check", "active": true, "startInTray": false, "enableCustomMetadataId": true, @@ -12,13 +12,13 @@ "$type": "UNCSource", "filter": "avi,wav,mxf", "local": { - "address": "file://10.10.1.100/BRAAVOS/ARCHIVE", + "address": "file://c:\\_video", "userName": "mediacube", "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy", "timeout": 1000 }, "remote": { - "address": "ftp://10.10.1.100/ARCHIVE", + "address": "ftp://10.10.1.100/TESZT/CHECK", "userName": "mediacube", "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy", "timeout": 1000 @@ -34,6 +34,13 @@ "timeout": 1000 } }, + { + "$type": "OctopusMetadata", + "server": { + "address": "http://10.10.1.27/services/rest/octopus/", + "timeout": 1000 + } + }, { "$type": "MediaCubeMetadata", "server": { @@ -44,52 +51,46 @@ ], "targets": [ { - "label": "Adáskész", + "label": "1", "processor": "FXPTargetProcessor", - "outputFormat": "%ID%", - "killDateDays": 5, - "saveSegments": true, - "tag": "Adáskész", + "subFolderFormat": "%IDROOT%-%TEXT%", + "outputFormat": "%ID%-%TEXT%", + "tag": "1", "disableFileVersioning": true, "enableOverride": true, - "saveMorpheusMetadata": true, - "pathMorpheusMetadata": "/PLAYOUT/MorpheusGateway/Input", - "deviceIdMorpheus": "ISILON", "remote": { - "address": "ftp://10.10.1.100/PLAYOUT/Video", + "address": "ftp://10.10.1.100/TESZT/1", "userName": "mediacube", "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy", "timeout": 1000 } }, { - "label": "Újravágás", + "label": "2", "processor": "FXPTargetProcessor", "subFolderFormat": "%IDROOT%-%TEXT%", "outputFormat": "%ID%-%TEXT%", - "tag": "Újravágás", + "tag": "2", "disableFileVersioning": true, "enableOverride": true, "remote": { - "address": "ftp://10.10.1.100/PLAYOUT_NLE", + "address": "ftp://10.10.1.100/TESZT/2", "userName": "mediacube", "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy", "timeout": 1000 - }, - "sendEmailOnSuccess": true, - "successEmailRecipient": "vasary@elgekko.net", - "successEmailPattern": "A %TARGETNAME% újravágása szükséges." - }, + } + }, { - "label": "Archiválás", + "label": "KESZ", "processor": "FXPTargetProcessor", - "outputFormat": "%ID%", - "tag": "Archiválás", - "saveArchiveMetadata": true, + "subFolderFormat": "%IDROOT%-%TEXT%", + "outputFormat": "%ID%-%TEXT%", + "tag": "KESZ", "disableFileVersioning": true, "enableOverride": true, + "deleteAfterCopy": true, "remote": { - "address": "ftp://10.10.1.100/ARCHIVE/ONE", + "address": "ftp://10.10.1.100/TESZT/KESZ", "userName": "mediacube", "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy", "timeout": 1000 diff --git a/client/Maestro/Configuration/-configuration-nexio-ingest.json b/client/Maestro/Configuration/configuration-nexio-ingest.json similarity index 100% rename from client/Maestro/Configuration/-configuration-nexio-ingest.json rename to client/Maestro/Configuration/configuration-nexio-ingest.json diff --git a/client/Maestro/Configuration/configuration-studio.json b/client/Maestro/Configuration/configuration-studio.json deleted file mode 100644 index 61909c4c..00000000 --- a/client/Maestro/Configuration/configuration-studio.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "title": "Stúdió szerverről másolás", - "active": true, - "startInTray": true, - "enableCustomMetadataId": true, - "filter": "avi", - "player": { - }, - "source": { - "$type": "NEXIOSource", - "local": { - "address": "ws://10.10.1.27/services/nexio" - }, - "remote": { - "address": "ftp://10.10.1.55:2098", - "userName": "administrator", - "password": "+QtkeQdCTiOvZOgK/kUND4pO4/D+//r7ZIyluwMMdiqMEgO8iJErAG10ooWhPfiljQeXrdeyMzo7gWEZtcWpNSomGeDIbdMyQwtpqmMo1VEM3A27ZfzigY09YD46ECRh" - } - }, - "metadatas": [ - { - "$type": "OctopusMetadata", - "server": { - "address": "http://10.10.1.27/services/rest/octopus", - "timeout": 1000 - } - }, - { - "$type": "TrafficMetadata", - "server": { - "address": "Data Source=10.10.1.45;Initial Catalog=PA_Echo;Persist Security Info=True;", - "userName": "MAM", - "password": "7RKZYBzumKjL40SJwuwiFCvX57xuCN8zay6OttUm2wbrgImyYZBHyZTUUYrXX31Ge2Uwew07HYsqh2uzdJeDBDwcVntxaHg3nIpv9Dyq/odVoiC4tUF/K+lgvKWANcrZ", - "timeout": 1000 - } - }, - { - "$type": "MediaCubeMetadata", - "server": { - "address": "http://10.10.1.27/services/rest/jobengine", - "userName": "mediacube", - "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy", - "timeout": 1000 - } - } - ], - "targets": [ - { - "label": "Octopus mappába küldés", - "processor": "FXPTargetProcessor", - "subFolderFormat": "%IDROOT%-%TEXT%", - "outputFormat": "%ID%-%SOURCENAME%", - "killDateDays": 15, - "temporaryCopy": true, - "remote": { - "address": "ftp://10.10.1.100/OCTOPUS", - "userName": "mediacube", - "password": "H7YCE8gvuGsPvN3bQSf4FTH0/4IRmoe3gKY0QvgG+wlfqS48yLhm/fDoPSRaWpDWa3RKZAnLF3pKs+lLSQX0IRVZDRCkydQP7syEwKhHztbJ+A88W9rKRF2JrQ7W6jA1", - "timeout": 1000 - }, - "tag": "Betöltés" - }, - { - "label": "Traffic mappába küldés", - "processor": "FXPTargetProcessor", - "outputFormat": "%ID%-%SOURCENAME%", - "tag": "Betöltés", - "subFolderFormat": "%IDROOT%-%TEXT%", - "killDateDays": 7, - "temporaryCopy": true, - "saveArchiveMetadata": false, - "remote": { - "address": "ftp://10.10.1.100/PLAYOUT_NLE", - "userName": "mediacube", - "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy", - "timeout": 1000 - } - }, - { - "label": "Promo mappába küldés", - "processor": "FTPTargetProcessor", - "outputFormat": "%ID%-%SOURCENAME%", - "tag": "Betöltés", - "subFolderFormat": "%IDROOT%-%TEXT%/INGEST-%TIMESTAMP%", - "killDateDays": 30, - "temporaryCopy": true, - "saveArchiveMetadata": false, - "remote": { - "address": "ftp://10.10.1.100/PROMO_NLE", - "userName": "mediacube", - "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy", - "timeout": 1000 - } - }, - { - "label": "Reklám mappába küldés", - "processor": "FTPTargetProcessor", - "outputFormat": "%ID%-%SOURCENAME%", - "tag": "Betöltés", - "subFolderFormat": "%IDROOT%-%TEXT%/INGEST-%TIMESTAMP%", - "killDateDays": 14, - "temporaryCopy": true, - "saveArchiveMetadata": false, - "remote": { - "address": "ftp://10.10.1.100/REKLAM_NLE", - "userName": "mediacube", - "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy", - "timeout": 1000 - } - }, - { - "label": "TQC check", - "processor": "FXPTargetProcessor", - "outputFormat": "%ID%-%SOURCENAME%", - "tag": "Betöltés", - "killDateDays": 7, - "temporaryCopy": true, - "saveArchiveMetadata": false, - "remote": { - "address": "ftp://10.10.1.100/TQC/CHECK", - "userName": "mediacube", - "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy", - "timeout": 1000 - } - }, - { - "label": "TQC promo", - "processor": "FXPTargetProcessor", - "outputFormat": "%ID%-%SOURCENAME%", - "tag": "Betöltés", - "killDateDays": 7, - "temporaryCopy": true, - "saveArchiveMetadata": false, - "remote": { - "address": "ftp://10.10.1.100/TQC/PROMO", - "userName": "mediacube", - "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy", - "timeout": 1000 - } - }, - { - "label": "TQC reklám", - "processor": "FXPTargetProcessor", - "outputFormat": "%ID%-%SOURCENAME%", - "tag": "Betöltés", - "killDateDays": 7, - "temporaryCopy": true, - "saveArchiveMetadata": false, - "remote": { - "address": "ftp://10.10.1.100/TQC/REKLAM", - "userName": "mediacube", - "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy", - "timeout": 1000 - } - }] -} diff --git a/client/Maestro/Configuration/configuration-studio1.json b/client/Maestro/Configuration/configuration-studio1.json deleted file mode 100644 index 575cc832..00000000 --- a/client/Maestro/Configuration/configuration-studio1.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "title": "NEXIO2UNC_FXP", - "active": false, - "startInTray": false, - "enableCustomMetadataId": true, - "filter": "avi", - "player": { - }, - "source": { - "$type": "NEXIOSource", - "local": { - "address": "ws://10.10.1.27/services/nexio" - }, - "remote": { - "address": "ftp://10.10.1.55:2098", - "userName": "administrator", - "password": "+QtkeQdCTiOvZOgK/kUND4pO4/D+//r7ZIyluwMMdiqMEgO8iJErAG10ooWhPfiljQeXrdeyMzo7gWEZtcWpNSomGeDIbdMyQwtpqmMo1VEM3A27ZfzigY09YD46ECRh" - } - }, - "metadatas": [ - { - "$type": "OctopusMetadata", - "server": { - "address": "http://localhost:8888/services/rest/octopus", - "timeout": 1000 - } - }, - { - "$type": "TrafficMetadata", - "server": { - "address": "Data Source=10.10.1.45;Initial Catalog=PA_Echo;Persist Security Info=True;", - "userName": "MAM", - "password": "7RKZYBzumKjL40SJwuwiFCvX57xuCN8zay6OttUm2wbrgImyYZBHyZTUUYrXX31Ge2Uwew07HYsqh2uzdJeDBDwcVntxaHg3nIpv9Dyq/odVoiC4tUF/K+lgvKWANcrZ", - "timeout": 1000 - } - }, - { - "$type": "MediaCubeMetadata", - "server": { - "address": "http://10.10.1.27/services/rest/jobengine", - "userName": "mediacube", - "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy", - "timeout": 1000 - } - } - ], - "targets": [ - { - "label": "Archiválás", - "processor": "FXPTargetProcessor", - "outputFormat": "%ID%", - "tag": "Archiválás", - "saveArchiveMetadata": true, - "deleteAfterCopy": false, - "temporaryCopy": true, - "killDateDays": 5, - "remote": { - "address": "ftp://10.10.1.100:21/ARCHIVE/TESZT", - "userName": "mediacube", - "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy", - "timeout": 1000 - } - } - ] -} diff --git a/client/Maestro/Configuration/configuration-tqc-archive.json b/client/Maestro/Configuration/configuration-tqc-archive.json deleted file mode 100644 index 5fcb4d03..00000000 --- a/client/Maestro/Configuration/configuration-tqc-archive.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "title": "Playout_NLE", - "active": false, - "startInTray": false, - "enableCustomMetadataId": true, - "player": { - "enabled": true, - "autoStart": false, - "segmentEditor": true - }, - "source": { - "$type": "UNCSource", - "filter": "avi,wav,mxf", - "local": { - "address": "file://10.10.1.100/BRAAVOS/ARCHIVE", - "userName": "mediacube", - "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy", - "timeout": 1000 - }, - "remote": { - "address": "ftp://10.10.1.100/ARCHIVE", - "userName": "mediacube", - "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy", - "timeout": 1000 - } - }, - "metadatas": [ - { - "$type": "TrafficMetadata", - "server": { - "address": "Data Source=10.10.1.45;Initial Catalog=PA_Echo;Persist Security Info=True;", - "userName": "MAM", - "password": "7RKZYBzumKjL40SJwuwiFCvX57xuCN8zay6OttUm2wbrgImyYZBHyZTUUYrXX31Ge2Uwew07HYsqh2uzdJeDBDwcVntxaHg3nIpv9Dyq/odVoiC4tUF/K+lgvKWANcrZ", - "timeout": 1000 - } - }, - { - "$type": "MediaCubeMetadata", - "server": { - "address": "http://10.10.1.27/services/rest/jobengine/", - "timeout": 1000 - } - } - ], - "targets": [ - { - "label": "Archiválás", - "processor": "FXPTargetProcessor", - "subFolderFormat": "%IDROOT%-%TEXT%", - "outputFormat": "%ID%-%TEXT%", - "tag": "Újravágás", - "temporaryCopy": true, - "remote": { - "address": "ftp://10.10.1.100/ARCHIVE/TEST", - "userName": "mediacube", - "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy", - "timeout": 1000 - }, - "sendEmailOnSuccess": true, - "successEmailRecipient": "vasary@elgekko.net", - "successEmailPattern": "A %TARGETNAME% újravágása szükséges." - } - - ] -} diff --git a/client/Maestro/Maestro.csproj b/client/Maestro/Maestro.csproj index 059b858c..ed1d9b3b 100644 --- a/client/Maestro/Maestro.csproj +++ b/client/Maestro/Maestro.csproj @@ -305,13 +305,10 @@ Always - - Always - Always - + Always @@ -326,10 +323,7 @@ Always - - Always - - + Always @@ -370,9 +364,6 @@ Always - - Always - diff --git a/client/Maestro/MaestroForm.Designer.cs b/client/Maestro/MaestroForm.Designer.cs index 52bd64c4..3d0d96b3 100644 --- a/client/Maestro/MaestroForm.Designer.cs +++ b/client/Maestro/MaestroForm.Designer.cs @@ -32,11 +32,11 @@ namespace Maestro { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MaestroForm)); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); this.groupSource = new System.Windows.Forms.GroupBox(); this.dgSource = new System.Windows.Forms.DataGridView(); this.bindingSource = new System.Windows.Forms.BindingSource(this.components); @@ -77,16 +77,7 @@ namespace Maestro { this.tabSystem = new System.Windows.Forms.TabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); this.dgJobs = new System.Windows.Forms.DataGridView(); - this.bindingSourceJobs = new System.Windows.Forms.BindingSource(this.components); - this.tabPage2 = new System.Windows.Forms.TabPage(); - this.dgMessages = new System.Windows.Forms.DataGridView(); - this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.dataGridViewProgressColumn1 = new Maestro.Commons.DataGridViewProgressColumn(); - this.systemMessageBindingSource = new System.Windows.Forms.BindingSource(this.components); - this.metadataInfoBindingSource = new System.Windows.Forms.BindingSource(this.components); this.columnInputName = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.Progress = new Maestro.Commons.DataGridViewProgressColumn(); this.columnLabel = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.columnID = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.columnStatus = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -96,6 +87,14 @@ namespace Maestro { this.columnOutput = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.columnKillDate = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.columnMessage = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.bindingSourceJobs = new System.Windows.Forms.BindingSource(this.components); + this.tabPage2 = new System.Windows.Forms.TabPage(); + this.dgMessages = new System.Windows.Forms.DataGridView(); + this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewProgressColumn1 = new Maestro.Commons.DataGridViewProgressColumn(); + this.systemMessageBindingSource = new System.Windows.Forms.BindingSource(this.components); + this.metadataInfoBindingSource = new System.Windows.Forms.BindingSource(this.components); this.groupSource.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dgSource)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.bindingSource)).BeginInit(); @@ -735,7 +734,6 @@ namespace Maestro { this.dgJobs.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.columnInputName, this.columnLabel, - this.Progress, this.columnID, this.columnStatus, this.columnStarted, @@ -771,6 +769,82 @@ namespace Maestro { this.dgJobs.CellToolTipTextNeeded += new System.Windows.Forms.DataGridViewCellToolTipTextNeededEventHandler(this.dgJobs_CellToolTipTextNeeded); this.dgJobs.MouseClick += new System.Windows.Forms.MouseEventHandler(this.dataGridJobs_MouseClick); // + // columnInputName + // + this.columnInputName.DataPropertyName = "InputName"; + this.columnInputName.Frozen = true; + this.columnInputName.HeaderText = "InputName"; + this.columnInputName.Name = "columnInputName"; + this.columnInputName.Width = 93; + // + // columnLabel + // + this.columnLabel.DataPropertyName = "Label"; + this.columnLabel.Frozen = true; + this.columnLabel.HeaderText = "Label"; + this.columnLabel.Name = "columnLabel"; + this.columnLabel.Width = 63; + // + // columnID + // + this.columnID.DataPropertyName = "ID"; + dataGridViewCellStyle4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.columnID.DefaultCellStyle = dataGridViewCellStyle4; + this.columnID.HeaderText = "ID"; + this.columnID.Name = "columnID"; + this.columnID.Width = 44; + // + // columnStatus + // + this.columnStatus.DataPropertyName = "Status"; + dataGridViewCellStyle5.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.columnStatus.DefaultCellStyle = dataGridViewCellStyle5; + this.columnStatus.HeaderText = "Status"; + this.columnStatus.Name = "columnStatus"; + this.columnStatus.Width = 66; + // + // columnStarted + // + this.columnStarted.DataPropertyName = "Started"; + this.columnStarted.HeaderText = "Started"; + this.columnStarted.Name = "columnStarted"; + this.columnStarted.Width = 71; + // + // columnFinished + // + this.columnFinished.DataPropertyName = "Finished"; + this.columnFinished.HeaderText = "Finished"; + this.columnFinished.Name = "columnFinished"; + this.columnFinished.Width = 79; + // + // columnInput + // + this.columnInput.DataPropertyName = "Input"; + this.columnInput.HeaderText = "Input"; + this.columnInput.Name = "columnInput"; + this.columnInput.Width = 59; + // + // columnOutput + // + this.columnOutput.DataPropertyName = "Output"; + this.columnOutput.HeaderText = "Output"; + this.columnOutput.Name = "columnOutput"; + this.columnOutput.Width = 68; + // + // columnKillDate + // + this.columnKillDate.DataPropertyName = "KillDate"; + this.columnKillDate.HeaderText = "KillDate"; + this.columnKillDate.Name = "columnKillDate"; + this.columnKillDate.Width = 75; + // + // columnMessage + // + this.columnMessage.DataPropertyName = "Message"; + this.columnMessage.HeaderText = "Message"; + this.columnMessage.Name = "columnMessage"; + this.columnMessage.Width = 83; + // // tabPage2 // this.tabPage2.Controls.Add(this.dgMessages); @@ -853,90 +927,6 @@ namespace Maestro { // this.metadataInfoBindingSource.DataSource = typeof(Maestro.Metadata.MetadataInfo); // - // columnInputName - // - this.columnInputName.DataPropertyName = "InputName"; - this.columnInputName.Frozen = true; - this.columnInputName.HeaderText = "InputName"; - this.columnInputName.Name = "columnInputName"; - this.columnInputName.Width = 93; - // - // columnLabel - // - this.columnLabel.DataPropertyName = "Label"; - this.columnLabel.Frozen = true; - this.columnLabel.HeaderText = "Label"; - this.columnLabel.Name = "columnLabel"; - this.columnLabel.Width = 63; - // - // Progress - // - this.Progress.DataPropertyName = "Progress"; - this.Progress.Frozen = true; - this.Progress.HeaderText = ""; - this.Progress.MinimumWidth = 100; - this.Progress.Name = "Progress"; - // - // columnID - // - this.columnID.DataPropertyName = "ID"; - dataGridViewCellStyle4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - this.columnID.DefaultCellStyle = dataGridViewCellStyle4; - this.columnID.HeaderText = "ID"; - this.columnID.Name = "columnID"; - this.columnID.Width = 44; - // - // columnStatus - // - this.columnStatus.DataPropertyName = "Status"; - dataGridViewCellStyle5.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - this.columnStatus.DefaultCellStyle = dataGridViewCellStyle5; - this.columnStatus.HeaderText = "Status"; - this.columnStatus.Name = "columnStatus"; - this.columnStatus.Width = 66; - // - // columnStarted - // - this.columnStarted.DataPropertyName = "Started"; - this.columnStarted.HeaderText = "Started"; - this.columnStarted.Name = "columnStarted"; - this.columnStarted.Width = 71; - // - // columnFinished - // - this.columnFinished.DataPropertyName = "Finished"; - this.columnFinished.HeaderText = "Finished"; - this.columnFinished.Name = "columnFinished"; - this.columnFinished.Width = 79; - // - // columnInput - // - this.columnInput.DataPropertyName = "Input"; - this.columnInput.HeaderText = "Input"; - this.columnInput.Name = "columnInput"; - this.columnInput.Width = 59; - // - // columnOutput - // - this.columnOutput.DataPropertyName = "Output"; - this.columnOutput.HeaderText = "Output"; - this.columnOutput.Name = "columnOutput"; - this.columnOutput.Width = 68; - // - // columnKillDate - // - this.columnKillDate.DataPropertyName = "KillDate"; - this.columnKillDate.HeaderText = "KillDate"; - this.columnKillDate.Name = "columnKillDate"; - this.columnKillDate.Width = 75; - // - // columnMessage - // - this.columnMessage.DataPropertyName = "Message"; - this.columnMessage.HeaderText = "Message"; - this.columnMessage.Name = "columnMessage"; - this.columnMessage.Width = 83; - // // MaestroForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); diff --git a/client/Maestro/MaestroForm.Target.cs b/client/Maestro/MaestroForm.Target.cs index 5824f70e..dd52678f 100644 --- a/client/Maestro/MaestroForm.Target.cs +++ b/client/Maestro/MaestroForm.Target.cs @@ -1,15 +1,15 @@ using Maestro.Sources; -using System; -using System.Linq; -using System.Windows.Forms; -using System.Collections.Generic; +using MaestroShared.Commons; using MaestroShared.Configuration; using MaestroShared.Metadata; -using MaestroShared.Targets; using MaestroShared.Target; -using System.ComponentModel; -using MaestroShared.Commons; +using MaestroShared.Targets; using Myriadbits.MXF; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Windows.Forms; namespace Maestro { @@ -97,8 +97,7 @@ namespace Maestro { MXFFile mxf = new MXFFile(fullName); mxf.Inspect(); sourceItem.Frames = (long)mxf.TimecodeComponent.Duration; - } - catch (Exception e) { + } catch (Exception e) { string fullName = (sourceItem as FileSourceItem).FileInfo.FullName; logger.Error("Can not detect length of '{0}'. Error message is: {1}", fullName, e.Message); } @@ -107,8 +106,7 @@ namespace Maestro { TargetProcessorParameter processorParameter = null; try { processorParameter = CreateProcessorParameter(target, sourceItem, createDate); - } - catch (Exception e) { + } catch (Exception e) { result = null; break; } @@ -194,7 +192,7 @@ namespace Maestro { result.MessageBus = MessageBus; result.CreateDate = createDate; result.Frames = sourceItem.Frames; - + result.TargetOrder = Configuration.Targets.ToList().IndexOf(target); result.ArchiveMetadata.userName = result.UserName; if (SelectedMetadata.Kind == MetadataType.MediaCube && result.ArchiveMetadata != null) { result.ArchiveMetadata.itemHouseId = PatternNameMaker.Get(result.ArchiveMetadata.itemHouseId, result.ID, result.InputFileName, null, null, result.MetadataText); @@ -257,19 +255,29 @@ namespace Maestro { } private void OnExecuteClick(object sender, EventArgs e) { - IEnumerable keys = currentProcessors.Keys.OrderByDescending(k => (k.Tag as Target).NexioServer); - if (keys == null) - return; + //TODO doksiba, hogy ez miert van igy - foreach (var key in keys) { - List targetProcessors = currentProcessors[key]; - if (targetProcessors == null) + //IEnumerable keys = currentProcessors.Keys.OrderByDescending(k => (k.Tag as Target).NexioServer); + //if (keys == null) + // return; + List targetProcessors = new List(); + + foreach (var key in currentProcessors.Keys) { + if (currentProcessors[key] == null) continue; - targetProcessors.ForEach(p => { + targetProcessors.AddRange(currentProcessors[key]); + } + + targetProcessors + .OrderBy(p => p.InputName) + .ThenByDescending(p => p.Parameters.TargetConfig.NexioServer) + .ThenBy(p => p.Parameters.TargetOrder) + .ToList() + .ForEach(p => { jobs.Add(p); jobsQueue.Enqueue(p); }); - } + ClearSelectedProcessors(); if (processorWorkers == null) diff --git a/client/Maestro/MaestroForm.cs b/client/Maestro/MaestroForm.cs index 7dc9eef3..3bedf1c5 100644 --- a/client/Maestro/MaestroForm.cs +++ b/client/Maestro/MaestroForm.cs @@ -1,22 +1,22 @@ -using LinkDotNet.MessageHandling.Contracts; +using LinkDotNet.MessageHandling; +using LinkDotNet.MessageHandling.Contracts; +using MaestroShared.Commons; +using MaestroShared.Configuration; +using MaestroShared.Resources; +using MaestroShared.Targets; +using MediaCubeClient; using NLog; +using OctopusClient; using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; -using System.Windows.Forms; -using System.Threading; +using System.IO; using System.Linq; +using System.Threading; +using System.Windows.Forms; using TrafficClient; -using OctopusClient; -using System.IO; -using MediaCubeClient; -using LinkDotNet.MessageHandling; -using MaestroShared.Configuration; -using MaestroShared.Targets; -using MaestroShared.Commons; -using MaestroShared.Resources; namespace Maestro { @@ -117,7 +117,7 @@ namespace Maestro { private void MaestroForm_Resize(object sender, EventArgs e) { if (WindowState == FormWindowState.Minimized) { - if (TrayApplicationContext.GlobalConfig.MinimizeToTray) + if (TrayApplicationContext.GlobalConfig.MinimizeToTray) Visible = false; } } diff --git a/client/Maestro/MaestroForm.resx b/client/Maestro/MaestroForm.resx index 6d44e5c3..d975f3f6 100644 --- a/client/Maestro/MaestroForm.resx +++ b/client/Maestro/MaestroForm.resx @@ -128,7 +128,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAS - CAAAAk1TRnQBSQFMAgEBAgEAAbgBAQG4AQEBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo + CAAAAk1TRnQBSQFMAgEBAgEAAcgBAQHIAQEBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA diff --git a/client/Maestro/Properties/AssemblyInfo.cs b/client/Maestro/Properties/AssemblyInfo.cs index 4655203e..822bd58d 100644 --- a/client/Maestro/Properties/AssemblyInfo.cs +++ b/client/Maestro/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.0.8.4")] -[assembly: AssemblyFileVersion("2.0.8.4")] +[assembly: AssemblyVersion("2.0.8.5")] +[assembly: AssemblyFileVersion("2.0.8.5")] diff --git a/client/MaestroShared/Targets/TargetProcessorParameter.cs b/client/MaestroShared/Targets/TargetProcessorParameter.cs index 7af553e4..9771fb53 100644 --- a/client/MaestroShared/Targets/TargetProcessorParameter.cs +++ b/client/MaestroShared/Targets/TargetProcessorParameter.cs @@ -1,9 +1,9 @@ -using System.Collections.Generic; +using LinkDotNet.MessageHandling.Contracts; using MaestroShared.Configuration; +using MaestroShared.Interfaces; using MaestroShared.Metadata; -using LinkDotNet.MessageHandling.Contracts; using System; -using MaestroShared.Interfaces; +using System.Collections.Generic; namespace MaestroShared.Target { public class TargetProcessorParameter { @@ -22,5 +22,7 @@ namespace MaestroShared.Target { public IMessageBus MessageBus { get; set; } public DateTime CreateDate { get; set; } public long Frames { get; set; } + public int TargetOrder { get; set; } + } } diff --git a/server/user.jobengine.executors/config/config.xml b/server/user.jobengine.executors/config/config.xml index 16370083..1d7487a9 100644 --- a/server/user.jobengine.executors/config/config.xml +++ b/server/user.jobengine.executors/config/config.xml @@ -14,6 +14,7 @@ + diff --git a/server/user.jobengine.executors/config/scheduledjobs.json b/server/user.jobengine.executors/config/scheduledjobs.json index 4577c606..c0864540 100644 --- a/server/user.jobengine.executors/config/scheduledjobs.json +++ b/server/user.jobengine.executors/config/scheduledjobs.json @@ -1,4 +1,11 @@ {"joblist":[ + { + "name" : "sys: Remove duplicates", + "template": "duplicate-remover.xml", + "parameters": [ + {"name": "limit", "value": 1, "type": "java.lang.Integer"} + ] + }, { "name" : "sys: Check LOWRES integrity", "template": "check-lowres-integrity.xml", diff --git a/server/user.jobengine.executors/jobtemplates/duplicate-remover.xml b/server/user.jobengine.executors/jobtemplates/duplicate-remover.xml new file mode 100644 index 00000000..4650acb0 --- /dev/null +++ b/server/user.jobengine.executors/jobtemplates/duplicate-remover.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/server/user.jobengine.executors/src/user/jobengine/server/steps/DuplicateRemoverStep.java b/server/user.jobengine.executors/src/user/jobengine/server/steps/DuplicateRemoverStep.java new file mode 100644 index 00000000..f8c24c58 --- /dev/null +++ b/server/user.jobengine.executors/src/user/jobengine/server/steps/DuplicateRemoverStep.java @@ -0,0 +1,100 @@ +package user.jobengine.server.steps; + +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.Marker; + +import user.jobengine.db.IItemManager; +import user.jobengine.db.IResultSetConsumer; +import user.jobengine.db.IStatementDecorator; +import user.jobengine.db.MediaFile; +import user.jobengine.server.IJobEngine; +import user.jobengine.server.IJobRuntime; + +public class DuplicateRemoverStep extends JobStep { + private static final Logger logger = LogManager.getLogger(); + private static final String LOWRES_ROOT = "/mediacube/data/lowres/www/video"; + private static final String DUPLICATES_ROOT = "/mediacube/data/lowres/www"; + + private Marker marker; + private IItemManager manager; + + @StepEntry + public Object[] execute(int limit, IJobEngine jobEngine, IJobRuntime jobRuntime) throws Exception { + marker = jobRuntime.getMarker(); + manager = jobEngine.getItemManager(); + processLowresDuplicates(limit); + return null; + } + + public void processLowresDuplicates(int limit) { + long count[] = { 0, 0 }; + + manager.executeQuery("select count(filecount) from vw_items_rd_dup", rs -> { + count[0] = rs.getLong(1); + return false; + }, null); + + if (count[0] == 0) { + setProgress(100); + return; + } + + if (limit > 0) + count[0] = limit; + + manager.executeQuery("select filename from vw_items_rd_dup order by filecount desc", rs -> { + String fileName = rs.getString("filename"); + processLowresDuplicates(fileName); + count[1]++; + int progress = (int) ((double) count[1] * 100 / count[0]); + setProgress(progress); + if (count[0] == count[1]) + return false; + else + return true; + }, null); + } + + private void processLowresDuplicates(String fileName) { + String query = "select mediafileid, mediafilehouseid, relativepath from vw_items_rd_lh where filename = ?"; + IStatementDecorator decorator = st -> { + st.setString(1, fileName); + }; + + MediaFile[] masterMediaFile = { null }; + + IResultSetConsumer consumer = rs -> { + long mediaFileId = rs.getLong("mediafileid"); + MediaFile mediaFile = (MediaFile) manager.get(MediaFile.class, mediaFileId); + if (masterMediaFile[0] == null) { + masterMediaFile[0] = mediaFile; + return true; + } + + String path = rs.getString("relativepath"); + boolean moved = false; + try { + Path target = Paths.get(DUPLICATES_ROOT, path); + EscortFiles.ensureUNCFolder(target.getParent()); + Files.move(Paths.get(LOWRES_ROOT, path), target); + moved = true; + } catch (Exception e) { + logger.catching(e); + } + + if (moved) { + logger.info(marker, "{} {} {}", mediaFile.getMediaId(), mediaFile.getRelativePath(), masterMediaFile[0].getRelativePath()); + mediaFile.setRelativePath(masterMediaFile[0].getRelativePath()); + manager.modify(mediaFile); + } + return true; + }; + manager.executeQuery(query, consumer, decorator); + } + +} diff --git a/server/user.jobengine.osgi.server/test/user/jobengine/server/IT/Support.java b/server/user.jobengine.osgi.server/test/user/jobengine/server/IT/Support.java index b71d720e..d5408eb5 100644 --- a/server/user.jobengine.osgi.server/test/user/jobengine/server/IT/Support.java +++ b/server/user.jobengine.osgi.server/test/user/jobengine/server/IT/Support.java @@ -1,6 +1,5 @@ package user.jobengine.server.IT; -import java.io.File; import java.io.IOException; import java.nio.charset.Charset; import java.nio.file.Files; @@ -362,65 +361,6 @@ public class Support { return String.format("%s %s %s", start, name, channel); } - private void processLowresDuplicateGroup(String fileName) { - //System.out.println("*** Processing: " + fileName); - String query = "select mediafileid, mediafilehouseid, relativepath from vw_items_rd_lh where filename = ?"; - IStatementDecorator decorator = st -> { - st.setString(1, fileName); - }; - - MediaFile[] masterMediaFile = { null }; - - IResultSetConsumer consumer = rs -> { - long mediaFileId = rs.getLong("mediafileid"); - MediaFile mediaFile = (MediaFile) manager.get(MediaFile.class, mediaFileId); - if (masterMediaFile[0] == null) { - masterMediaFile[0] = mediaFile; - return true; - } - - String path = rs.getString("relativepath"); - File file = Paths.get(LOWRES_ROOT, path).toFile(); - duplicateLength[0] += file.length(); - - if (file.delete()) { - System.out.println(String.format("%d %s %s", mediaFile.getMediaId(), mediaFile.getRelativePath(), masterMediaFile[0].getRelativePath())); - mediaFile.setRelativePath(masterMediaFile[0].getRelativePath()); - manager.modify(mediaFile); - } - return true; - }; - manager.executeQuery(query, consumer, decorator); - } - - @Test - public void processLowresDuplicates() { - long count[] = { 0, 0 }; - manager.executeQuery("select count(filecount) from vw_items_rd_dup", rs -> { - count[0] = rs.getLong(1); - return false; - }, null); - - int limit[] = { 1, 0 }; - int progress[] = { 0, 0 }; - manager.executeQuery("select filename from vw_items_rd_dup order by filecount desc", rs -> { - String fileName = rs.getString("filename"); - processLowresDuplicateGroup(fileName); - count[1]++; - progress[1] = (int) ((double) count[1] * 100 / count[0]); - if (progress[1] > progress[0]) { - progress[0] = progress[1]; - } - System.out.println("Completed " + progress[0] + " " + count[1] + "/" + count[0] + " available " + duplicateLength[0]); - limit[1]++; - - if (limit[0] == limit[1]) - return false; - else - return true; - }, null); - } - @Test public void processRecordingsSummertime() throws Exception { diff --git a/server/user.jobengine.osgi.server/test/user/jobengine/server/IT/SupportRemoveDuplicates.java b/server/user.jobengine.osgi.server/test/user/jobengine/server/IT/SupportRemoveDuplicates.java index bb5f8c81..574024d8 100644 --- a/server/user.jobengine.osgi.server/test/user/jobengine/server/IT/SupportRemoveDuplicates.java +++ b/server/user.jobengine.osgi.server/test/user/jobengine/server/IT/SupportRemoveDuplicates.java @@ -2,7 +2,6 @@ package user.jobengine.server.IT; import java.io.File; import java.nio.file.Paths; -import java.util.Date; import org.junit.AfterClass; import org.junit.BeforeClass; @@ -16,15 +15,8 @@ import user.jobengine.db.ItemManager; import user.jobengine.db.MediaFile; public class SupportRemoveDuplicates { - public class BD { - Date fBD; - Date nBD; - } - protected static IItemManager manager = null; - private static final String LOWRES_ROOT = "//10.10.1.27/mclowres/www/video"; - private static final long[] duplicateLength = { 0 }; @BeforeClass