From f6d5480c4ff941bfbe78cac17c0060e8de910a5c Mon Sep 17 00:00:00 2001 From: Daniel Lockyer Date: Tue, 12 Jan 2021 16:40:16 +0000 Subject: [PATCH] Renamed `TryGhost/Ghost-Utils` links to `TryGhost/Utils` no issue - this repository has been renamed so this commit just brings all the links inline with this change --- ghost/adapter-manager/package.json | 2 +- ghost/bootstrap-socket/package.json | 2 +- ghost/constants/package.json | 2 +- ghost/errors/package.json | 2 +- ghost/image-transform/package.json | 2 +- ghost/job-manager/README.md | 8 ++++---- ghost/job-manager/package.json | 2 +- ghost/moleculer-service-from-class/package.json | 2 +- ghost/mw-session-from-token/package.json | 2 +- ghost/pretty-cli/package.json | 2 +- ghost/promise/package.json | 2 +- ghost/release-utils/package.json | 2 +- ghost/release-utils/test/changelog.test.js | 2 +- ghost/security/package.json | 2 +- ghost/session-service/package.json | 2 +- ghost/vhost-middleware/package.json | 2 +- ghost/zip/package.json | 2 +- 17 files changed, 20 insertions(+), 20 deletions(-) diff --git a/ghost/adapter-manager/package.json b/ghost/adapter-manager/package.json index caa7580e17..e0d8d27cd0 100644 --- a/ghost/adapter-manager/package.json +++ b/ghost/adapter-manager/package.json @@ -1,7 +1,7 @@ { "name": "@tryghost/adapter-manager", "version": "0.2.6", - "repository": "https://github.com/TryGhost/Ghost-Utils/tree/master/packages/adapter-manager", + "repository": "https://github.com/TryGhost/Utils/tree/master/packages/adapter-manager", "author": "Ghost Foundation", "license": "MIT", "main": "index.js", diff --git a/ghost/bootstrap-socket/package.json b/ghost/bootstrap-socket/package.json index 102b3ba145..90c4d0453e 100644 --- a/ghost/bootstrap-socket/package.json +++ b/ghost/bootstrap-socket/package.json @@ -1,7 +1,7 @@ { "name": "@tryghost/bootstrap-socket", "version": "0.2.4", - "repository": "https://github.com/TryGhost/Ghost-Utils/tree/master/packages/bootstrap-socket", + "repository": "https://github.com/TryGhost/Utils/tree/master/packages/bootstrap-socket", "author": "Ghost Foundation", "license": "MIT", "main": "index.js", diff --git a/ghost/constants/package.json b/ghost/constants/package.json index 2ac4a17b24..62d2cda9c9 100644 --- a/ghost/constants/package.json +++ b/ghost/constants/package.json @@ -1,7 +1,7 @@ { "name": "@tryghost/constants", "version": "0.1.3", - "repository": "https://github.com/TryGhost/Ghost-Utils/tree/master/packages/constants", + "repository": "https://github.com/TryGhost/Utils/tree/master/packages/constants", "author": "Ghost Foundation", "license": "MIT", "main": "index.js", diff --git a/ghost/errors/package.json b/ghost/errors/package.json index dcd9805c01..aea2afb5b9 100644 --- a/ghost/errors/package.json +++ b/ghost/errors/package.json @@ -1,7 +1,7 @@ { "name": "@tryghost/errors", "version": "0.2.6", - "repository": "https://github.com/TryGhost/Ghost-Utils/tree/master/packages/errors", + "repository": "https://github.com/TryGhost/Utils/tree/master/packages/errors", "author": "Ghost Foundation", "license": "MIT", "main": "index.js", diff --git a/ghost/image-transform/package.json b/ghost/image-transform/package.json index 3575ed35aa..10b24ae7fe 100644 --- a/ghost/image-transform/package.json +++ b/ghost/image-transform/package.json @@ -1,7 +1,7 @@ { "name": "@tryghost/image-transform", "version": "1.0.6", - "repository": "https://github.com/TryGhost/Ghost-Utils/tree/master/packages/image-transform", + "repository": "https://github.com/TryGhost/Utils/tree/master/packages/image-transform", "author": "Ghost Foundation", "license": "MIT", "main": "index.js", diff --git a/ghost/job-manager/README.md b/ghost/job-manager/README.md index 826df49d4e..09aab0113d 100644 --- a/ghost/job-manager/README.md +++ b/ghost/job-manager/README.md @@ -62,7 +62,7 @@ jobManager.addJob({ }); ``` -For more examples of JobManager initialization check [test/examples](https://github.com/TryGhost/Ghost-Utils/tree/master/packages/job-manager/test/examples) directory. +For more examples of JobManager initialization check [test/examples](https://github.com/TryGhost/Utils/tree/master/packages/job-manager/test/examples) directory. ### Job types and definitions @@ -74,7 +74,7 @@ Job manager's instance registers jobs through `addJob` method. The `offloaded` p When `offloaded: false` parameter is passed into `addJob` method, job manager registers an **inline** function for execution in FIFO queue. The job should not be computationally intensive and should have small amount of asynchronous operations. The developer should always account that the function will be executed on the **same event loop, thread and process as caller's process**. **inline** jobs should be [JavaScript functions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function) or a path to a module that exports a function as default. Note, at the moment it's not possible to defined scheduled or recurring **inline** job. -When skipped or `offloaded: true` parameter is passed into `addJob` method, job manager registers execution of an **offloaded** job. The job can be scheduled to run immediately, in the future, or in recurring manner (through `at` parameter). Jobs created this way are managed by [bree](https://github.com/breejs/bree) job scheduling library. For examples of job scripts check out [this section](https://github.com/breejs/bree#nodejs-email-queue-job-scheduling-example) of bree's documentation, test [job examples](https://github.com/TryGhost/Ghost-Utils/tree/master/packages/job-manager/test/jobs). +When skipped or `offloaded: true` parameter is passed into `addJob` method, job manager registers execution of an **offloaded** job. The job can be scheduled to run immediately, in the future, or in recurring manner (through `at` parameter). Jobs created this way are managed by [bree](https://github.com/breejs/bree) job scheduling library. For examples of job scripts check out [this section](https://github.com/breejs/bree#nodejs-email-queue-job-scheduling-example) of bree's documentation, test [job examples](https://github.com/TryGhost/Utils/tree/master/packages/job-manager/test/jobs). ### Offloaded jobs rules of thumb @@ -88,8 +88,8 @@ To prevent complications around failed job retries and and handling of specific Offloaded jobs are running on dedicated worker threads which makes their lifecycle a bit different to inline jobs: 1. When **starting** a job it's only sharing ENV variables with it's parent process. The job itself is run on an independent JavaScript execution thread. The script has to re-initialize any modules it will use. For example it should take care of: model layer initialization, cache initialization, etc. -2. When **finishing** work in a job prefer to signal successful termination by sending 'done' message to the parent thread: `parentPort.postMessage('done')` ([example use](https://github.com/TryGhost/Ghost-Utils/blob/0e423f6c5c69b08d81d470f49de95654d8cc90e3/packages/job-manager/test/jobs/graceful.js#L33-L37)). Finishing work this way terminates the thread through [worker.terminate()]((https://nodejs.org/dist/latest-v14.x/docs/api/worker_threads.html#worker_threads_worker_terminate)), which logs termination in parent process and flushes any pipes opened in thread. -3. Jobs that have iterative nature, or need cleanup before interrupting work should allow for **graceful shutdown** by listening on `'cancel'` message coming from parent thread ([example use](https://github.com/TryGhost/Ghost-Utils/blob/0e423f6c5c69b08d81d470f49de95654d8cc90e3/packages/job-manager/test/jobs/graceful.js#L12-L16)). +2. When **finishing** work in a job prefer to signal successful termination by sending 'done' message to the parent thread: `parentPort.postMessage('done')` ([example use](https://github.com/TryGhost/Utils/blob/0e423f6c5c69b08d81d470f49de95654d8cc90e3/packages/job-manager/test/jobs/graceful.js#L33-L37)). Finishing work this way terminates the thread through [worker.terminate()]((https://nodejs.org/dist/latest-v14.x/docs/api/worker_threads.html#worker_threads_worker_terminate)), which logs termination in parent process and flushes any pipes opened in thread. +3. Jobs that have iterative nature, or need cleanup before interrupting work should allow for **graceful shutdown** by listening on `'cancel'` message coming from parent thread ([example use](https://github.com/TryGhost/Utils/blob/0e423f6c5c69b08d81d470f49de95654d8cc90e3/packages/job-manager/test/jobs/graceful.js#L12-L16)). 4. When **exceptions** happen and expected outcome is to terminate current job, leave the exception unhandled allowing it to bubble up to the job manager. Unhandled exceptions [terminate current thread](https://nodejs.org/dist/latest-v14.x/docs/api/worker_threads.html#worker_threads_event_error) and allow for next scheduled job execution to happen. For more nuances on job structure best practices check [bree documentation](https://github.com/breejs/bree#writing-jobs-with-promises-and-async-await). diff --git a/ghost/job-manager/package.json b/ghost/job-manager/package.json index 7a9da68fb2..45bbe84643 100644 --- a/ghost/job-manager/package.json +++ b/ghost/job-manager/package.json @@ -1,7 +1,7 @@ { "name": "@tryghost/job-manager", "version": "0.7.0", - "repository": "https://github.com/TryGhost/Ghost-Utils/tree/master/packages/job-manager", + "repository": "https://github.com/TryGhost/Utils/tree/master/packages/job-manager", "author": "Ghost Foundation", "license": "MIT", "main": "index.js", diff --git a/ghost/moleculer-service-from-class/package.json b/ghost/moleculer-service-from-class/package.json index 20fc7f1bd3..6c53e6348f 100644 --- a/ghost/moleculer-service-from-class/package.json +++ b/ghost/moleculer-service-from-class/package.json @@ -1,7 +1,7 @@ { "name": "@tryghost/moleculer-service-from-class", "version": "0.2.9", - "repository": "https://github.com/TryGhost/Ghost-Utils/tree/master/packages/moleculer-service-from-class", + "repository": "https://github.com/TryGhost/Utils/tree/master/packages/moleculer-service-from-class", "author": "Ghost Foundation", "license": "MIT", "main": "index.js", diff --git a/ghost/mw-session-from-token/package.json b/ghost/mw-session-from-token/package.json index 2ca151f39f..1b96a60dc2 100644 --- a/ghost/mw-session-from-token/package.json +++ b/ghost/mw-session-from-token/package.json @@ -1,7 +1,7 @@ { "name": "@tryghost/mw-session-from-token", "version": "0.1.13", - "repository": "https://github.com/TryGhost/Ghost-Utils/tree/master/packages/mw-session-from-token", + "repository": "https://github.com/TryGhost/Utils/tree/master/packages/mw-session-from-token", "author": "Ghost Foundation", "license": "MIT", "main": "index.js", diff --git a/ghost/pretty-cli/package.json b/ghost/pretty-cli/package.json index 844d206117..aa7051097a 100644 --- a/ghost/pretty-cli/package.json +++ b/ghost/pretty-cli/package.json @@ -2,7 +2,7 @@ "name": "@tryghost/pretty-cli", "version": "1.2.12", "description": "A mini-module to style a sywac instance in a standard way", - "repository": "https://github.com/TryGhost/Ghost-Utils/tree/master/packages/pretty-cli", + "repository": "https://github.com/TryGhost/Utils/tree/master/packages/pretty-cli", "author": "Ghost Foundation", "license": "MIT", "main": "index.js", diff --git a/ghost/promise/package.json b/ghost/promise/package.json index aa308d99a0..0eec7ea871 100644 --- a/ghost/promise/package.json +++ b/ghost/promise/package.json @@ -1,7 +1,7 @@ { "name": "@tryghost/promise", "version": "0.1.3", - "repository": "https://github.com/TryGhost/Ghost-Utils/tree/master/packages/promise", + "repository": "https://github.com/TryGhost/Utils/tree/master/packages/promise", "author": "Ghost Foundation", "license": "MIT", "main": "index.js", diff --git a/ghost/release-utils/package.json b/ghost/release-utils/package.json index 45c4638e72..65b8f513cc 100644 --- a/ghost/release-utils/package.json +++ b/ghost/release-utils/package.json @@ -1,7 +1,7 @@ { "name": "@tryghost/release-utils", "version": "0.6.9", - "repository": "https://github.com/TryGhost/Ghost-Utils/tree/master/packages/release-utils", + "repository": "https://github.com/TryGhost/Utils/tree/master/packages/release-utils", "author": "Ghost Foundation", "license": "MIT", "main": "lib/index.js", diff --git a/ghost/release-utils/test/changelog.test.js b/ghost/release-utils/test/changelog.test.js index cff8ea6f91..60f8c009b5 100644 --- a/ghost/release-utils/test/changelog.test.js +++ b/ghost/release-utils/test/changelog.test.js @@ -15,7 +15,7 @@ describe('Changelog', function () { changelog .write({ - githubRepoPath: `https://github.com/TryGhost/Ghost-Utils`, + githubRepoPath: `https://github.com/TryGhost/Utils`, lastVersion: '@tryghost/release-utils@0.6.3' }) .sort() diff --git a/ghost/security/package.json b/ghost/security/package.json index 9e36a0d18a..80c0f3c48b 100644 --- a/ghost/security/package.json +++ b/ghost/security/package.json @@ -1,7 +1,7 @@ { "name": "@tryghost/security", "version": "0.2.3", - "repository": "https://github.com/TryGhost/Ghost-Utils/tree/master/packages/security", + "repository": "https://github.com/TryGhost/Utils/tree/master/packages/security", "author": "Ghost Foundation", "license": "MIT", "main": "index.js", diff --git a/ghost/session-service/package.json b/ghost/session-service/package.json index 80dfab0561..2f02cd362b 100644 --- a/ghost/session-service/package.json +++ b/ghost/session-service/package.json @@ -1,7 +1,7 @@ { "name": "@tryghost/session-service", "version": "0.1.14", - "repository": "https://github.com/TryGhost/Ghost-Utils/tree/master/packages/session-service", + "repository": "https://github.com/TryGhost/Utils/tree/master/packages/session-service", "author": "Ghost Foundation", "license": "MIT", "main": "index.js", diff --git a/ghost/vhost-middleware/package.json b/ghost/vhost-middleware/package.json index 20f9234f41..aabad95400 100644 --- a/ghost/vhost-middleware/package.json +++ b/ghost/vhost-middleware/package.json @@ -1,7 +1,7 @@ { "name": "@tryghost/vhost-middleware", "version": "1.0.10", - "repository": "https://github.com/TryGhost/Ghost-Utils/tree/master/packages/vhost-middleware", + "repository": "https://github.com/TryGhost/Utils/tree/master/packages/vhost-middleware", "author": "Ghost Foundation", "license": "MIT", "main": "index.js", diff --git a/ghost/zip/package.json b/ghost/zip/package.json index b124321ce3..8b2a261a90 100644 --- a/ghost/zip/package.json +++ b/ghost/zip/package.json @@ -1,7 +1,7 @@ { "name": "@tryghost/zip", "version": "1.1.7", - "repository": "https://github.com/TryGhost/Ghost-Utils/tree/master/packages/zip", + "repository": "https://github.com/TryGhost/Utils/tree/master/packages/zip", "author": "Ghost Foundation", "license": "MIT", "main": "index.js",