Skip to content
This repository has been archived by the owner on Jun 2, 2024. It is now read-only.

Commit

Permalink
fix: changes stream syncer without deps
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 committed Apr 29, 2019
1 parent 0c59791 commit b094f56
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sync/changes_stream_syncer.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ const db = config.officialNpmReplicate;
const lastSeqFile = path.join(config.dataDir, '.cnpmjs.org.last_seq.txt');
let _STREAM_ID = 0;

// debug: curl -v https://replicate.npmjs.com/_changes?since=9052545

module.exports = function* sync() {
const pedding = [];
const since = yield getLastSequence();
Expand Down Expand Up @@ -54,7 +56,8 @@ module.exports = function* sync() {

function syncPackage(change) {
const url = `${config.handleSyncRegistry}/${change.id}/sync`;
urllib.request(`${url}?sync_upstream=true`, {
// sync upstream and without deps
urllib.request(`${url}?sync_upstream=true&nodeps=true`, {
method: 'PUT',
dataType: 'json',
timeout: 10000,
Expand Down

0 comments on commit b094f56

Please sign in to comment.