From 37c431b6c0e7fe1a99e06469efb3d9d6bc64f993 Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Fri, 3 Nov 2017 09:42:39 +1300 Subject: [PATCH 1/5] Remove PHP 5.3 from Travis config, add 7.0 and 7.1 PHP 5.3 is unsupported on trusty in Travis, and the precise distro will be removed in a few months --- .travis.yml | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index cd0111ec..76bf91c5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,26 +4,18 @@ sudo: false language: php -php: - - 5.3 - - 5.4 - - 5.5 - - 5.6 - - 7.0 - -env: - - DB=MYSQL CORE_RELEASE=3.2 - matrix: include: - - php: 5.6 + - php: 5.4 env: DB=MYSQL CORE_RELEASE=3 - - php: 5.6 + - php: 5.5 env: DB=MYSQL CORE_RELEASE=3.1 - php: 5.6 env: DB=PGSQL CORE_RELEASE=3.2 - allow_failures: - php: 7.0 + env: DB=MYSQL CORE_RELEASE=3.6 + - php: 7.1 + env: DB=MYSQL CORE_RELEASE=3.6 before_script: - composer self-update || true From 19c6f201dad3d4c3c1328278e192216214abc161 Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Mon, 20 Nov 2017 15:09:23 +1300 Subject: [PATCH 2/5] Remove obsolete branch-alias --- composer.json | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 4e7da7a5..548e07a2 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,10 @@ "name": "symbiote/silverstripe-queuedjobs", "description": "A framework for defining and running background jobs in a queued manner", "type": "silverstripe-module", - "keywords": ["silverstripe", "jobs"], + "keywords": [ + "silverstripe", + "jobs" + ], "license": "BSD-3-Clause", "authors": [ { @@ -14,19 +17,15 @@ "email": "damian@silverstripe.com" } ], - "require": - { + "require": { "silverstripe/framework": "^3.1", "symbiote/silverstripe-multivaluefield": "^3.0", "asyncphp/doorman": "^1.2" }, "extra": { - "installer-name": "queuedjobs", - "branch-alias": { - "3.x-dev": "3.0.x-dev" - } + "installer-name": "queuedjobs" }, "replace": { "silverstripe/queuedjobs": "self.version" } -} +} \ No newline at end of file From b530c84f2ad39a82021b012b4171612d7c56539d Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Mon, 20 Nov 2017 15:12:25 +1300 Subject: [PATCH 3/5] Update translations --- lang/eo.yml | 2 ++ lang/fi.yml | 12 ++++++++++++ lang/hr.yml | 3 +++ lang/ru.yml | 2 ++ 4 files changed, 19 insertions(+) diff --git a/lang/eo.yml b/lang/eo.yml index 2d1d7f38..15ede7e9 100644 --- a/lang/eo.yml +++ b/lang/eo.yml @@ -1,4 +1,6 @@ eo: + CleanupJob: + Title: 'Purigi malnovajn taskojn el la datumbazo' CreateQueuedJobTask: Description: 'Tasko uzota por krei atendovican taskon. Pasu la klasnomon de la atendovican tasko kiel la parametron "nomo", pasu malnepran parametron "starto" (analizeblan de strtotime) por agordi startotempon por la tasko.' DeleteObjectJob: diff --git a/lang/fi.yml b/lang/fi.yml index 10ae4564..2e96cf46 100644 --- a/lang/fi.yml +++ b/lang/fi.yml @@ -1,18 +1,29 @@ fi: + CleanupJob: + Title: 'Siivoa vanhat työt tietokannasta' DeleteObjectJob: DELETE_JOB: 'Poista solmu' DELETE_OBJ2: 'Poista {title}' GenerateSitemapJob: REGENERATE: 'Luo Google-sivukartta .xml-tiedosto uudelleen' + PublishItemsJob: + Title: 'Julkaise kohteet {title} alla' QueuedJobDescriptor: PLURALNAME: 'Jonossa olevien tehtävien kuvaajat' SINGULARNAME: 'Jonossa olevan tehtävän kuvaaja' + QueuedJobRule: + PLURALNAME: 'Jonossa olevan tehtävän säännöt' + SINGULARNAME: 'Jonossa olevan tehtävän sääntö' QueuedJobs: + CREATE_JOB_TYPE: 'Luo tehtävä tyypiltään' + CREATE_NEW_JOB: 'Luo uusi tehtävä' + JOB_EXCEPT: 'Tehtävä aiheutti poikkeuksen %s sijainnissa %s rivillä %s' JOB_PAUSED: 'Tehtävä pysäytetty aikaan %s' JOB_TYPE: Tehtävätyyppi JobsFieldTitle: Tehtävät STALLED_JOB: 'Pysäytetty työ' STALLED_JOB_MSG: '%s tehtävä näyttää olevan seisahtunut. Se on nyt pysäytetty. Ole hyvä ja kirjaudu sisään tarkastellaksesi sitä' + START_JOB_TIME: 'Aloita tehtävä ajankohtana' TABLE_ADDE: Lisätty TABLE_MESSAGES: Viesti TABLE_NUM_PROCESSED: Tehty @@ -28,6 +39,7 @@ fi: ExecuteEveryDay: Päivä ExecuteEveryFortnight: 'Kaksi viikkoa' ExecuteEveryHour: Tunti + ExecuteEveryMinute: Minuutti ExecuteEveryMonth: Kuukausi ExecuteEveryWeek: Viikko ExecuteEveryYear: Vuosi diff --git a/lang/hr.yml b/lang/hr.yml index 28341c3c..6878ef26 100644 --- a/lang/hr.yml +++ b/lang/hr.yml @@ -1,4 +1,6 @@ hr: + CleanupJob: + Title: 'Očisti stare poslove iz baze' DeleteObjectJob: DELETE_JOB: 'Obriši čvor' DELETE_OBJ2: 'Obriši {title}' @@ -13,6 +15,7 @@ hr: JOB_TYPE: 'Tip posla' JOB_TYPE_PARAMS: 'Konstruktorski parametri za kreiranje posla' JobsFieldTitle: Poslovi + MEMORY_RELEASE: 'Posao oslobađa memoriju i čeka (%s korišeno)' STALLED_JOB: 'Zaglavljen posao' STALLED_JOB_MSG: 'Čini se da posao %s je zaglavljen. Pauziran je, molimo vas logirajte se da provjerite' START_JOB_TIME: 'Pokreni posao u' diff --git a/lang/ru.yml b/lang/ru.yml index 2e6176fa..a3ec9900 100644 --- a/lang/ru.yml +++ b/lang/ru.yml @@ -1,4 +1,6 @@ ru: + CleanupJob: + Title: 'Стереть старые задания из базы данных' CreateQueuedJobTask: Description: 'Задача используется для создания отложенного действия. Укажите тип задачи, укажите опциональный параметр "start" (обрабатывается функцией strtotime) для времени начала.' DeleteObjectJob: From f6750a9849eaa3fa51d08460282e4a114a10cd50 Mon Sep 17 00:00:00 2001 From: Stephen McMahon Date: Thu, 21 Dec 2017 15:00:59 +1100 Subject: [PATCH 4/5] Fix(Service) ensure run as user is cleared at the end of each runJob --- code/services/QueuedJobService.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/services/QueuedJobService.php b/code/services/QueuedJobService.php index ad9629e6..74b5e2b5 100644 --- a/code/services/QueuedJobService.php +++ b/code/services/QueuedJobService.php @@ -687,8 +687,7 @@ public function runJob($jobId) { Config::unnest(); - // okay let's reset our user if we've got an original - if ($runAsUser && $originalUser) { + if ($runAsUser) { Session::clear("loggedInAs"); if ($originalUser) { Session::set("loggedInAs", $originalUser->ID); From b58f6d0af2ec4374422a6563b2cde749ab46f630 Mon Sep 17 00:00:00 2001 From: Stephen McMahon Date: Thu, 21 Dec 2017 16:18:38 +1100 Subject: [PATCH 5/5] Fix(travis) remove php 5.3 from Travis config as it's no longer supported --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index cd0111ec..ea9db6cc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,6 @@ sudo: false language: php php: - - 5.3 - 5.4 - 5.5 - 5.6