fix: novadev-630#145
Conversation
There was a problem hiding this comment.
Manually performing auth via requests in the new rest client is unnecessary, you can use the existing OAuth2Client provided by dc-management-sdk. There are no unit tests for the rate-publish-queue. There was an existing version of the existing publish queue that supported parallel publishes and had unit tests, it was removed in a commit a while back, but there weren't actually many changes from the existing one:
You could use this to implement some of the unit tests as they should be similar.
I don't know why the build is failing, but the lock file updating to 2 is a bit suspect. You should develop dc-cli on a version before the lockfile change, as we publish to older node versions that don't support it.
| if (argv.publish) { | ||
| const pubQueue = new PublishQueue(argv); | ||
| const pubQueue = new RateLimitedPublishQueue(argv); | ||
| // const pubQueue = new PublishQueue(argv); |
There was a problem hiding this comment.
Either remove this comment (and the PublishQueue class) or make it optional via an argument.
| const itemStart = new Date().valueOf(); | ||
| const result = await this.publishContentItem(item); | ||
|
|
||
| console.log(`Publish ${result.item.label} = ${result.state}`); |
There was a problem hiding this comment.
This shouldn't be here. If the log is valuable, then it should be done with the LogFile class.
This is an alternative implementation to #145 which extends the existing publishing queue to support concurrent publishes. Benefits: - Publish() method actually starts the publish, dispatching is limited by both the rate limit and the concurrency limit. - Not too much change from the existing publish queue. Downsides: - Custom implementation of batching rather than a standard one, though this was technically already in place originally.
) This is an alternative implementation to amplience#145 which extends the existing publishing queue to support concurrent publishes. Benefits: - Publish() method actually starts the publish, dispatching is limited by both the rate limit and the concurrency limit. - Not too much change from the existing publish queue. Downsides: - Custom implementation of batching rather than a standard one, though this was technically already in place originally.
No description provided.