mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-30 05:35:18 -05:00
use user_id for tpds queue name
GitOrigin-RevId: e61440efd22ef9e858b2862b1a6fd022c6eb70a4
This commit is contained in:
parent
73d9d87b4d
commit
97ce66a9e7
2 changed files with 8 additions and 8 deletions
|
@ -112,7 +112,7 @@ const TpdsUpdateSender = {
|
||||||
streamOrigin: options.streamOrigin
|
streamOrigin: options.streamOrigin
|
||||||
}
|
}
|
||||||
return TpdsUpdateSender._enqueue(
|
return TpdsUpdateSender._enqueue(
|
||||||
options.project_id,
|
user_id,
|
||||||
'pipeStreamFrom',
|
'pipeStreamFrom',
|
||||||
postOptions,
|
postOptions,
|
||||||
function(err) {
|
function(err) {
|
||||||
|
@ -204,7 +204,7 @@ const TpdsUpdateSender = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return TpdsUpdateSender._enqueue(
|
return TpdsUpdateSender._enqueue(
|
||||||
options.project_id,
|
user_id,
|
||||||
'standardHttpRequest',
|
'standardHttpRequest',
|
||||||
moveOptions,
|
moveOptions,
|
||||||
callback
|
callback
|
||||||
|
@ -237,7 +237,7 @@ const TpdsUpdateSender = {
|
||||||
sl_all_user_ids: JSON.stringify(allUserIds)
|
sl_all_user_ids: JSON.stringify(allUserIds)
|
||||||
}
|
}
|
||||||
return TpdsUpdateSender._enqueue(
|
return TpdsUpdateSender._enqueue(
|
||||||
options.project_id,
|
user_id,
|
||||||
'standardHttpRequest',
|
'standardHttpRequest',
|
||||||
deleteOptions,
|
deleteOptions,
|
||||||
callback
|
callback
|
||||||
|
|
|
@ -109,7 +109,7 @@ describe('TpdsUpdateSender', function() {
|
||||||
const file_id = '4545345'
|
const file_id = '4545345'
|
||||||
const path = '/some/path/here.jpg'
|
const path = '/some/path/here.jpg'
|
||||||
this.updateSender._enqueue = function(uid, method, job, callback) {
|
this.updateSender._enqueue = function(uid, method, job, callback) {
|
||||||
uid.should.equal(project_id)
|
uid.should.equal(user_id)
|
||||||
job.method.should.equal('post')
|
job.method.should.equal('post')
|
||||||
job.streamOrigin.should.equal(
|
job.streamOrigin.should.equal(
|
||||||
`${filestoreUrl}/project/${project_id}/file/${file_id}`
|
`${filestoreUrl}/project/${project_id}/file/${file_id}`
|
||||||
|
@ -135,7 +135,7 @@ describe('TpdsUpdateSender', function() {
|
||||||
const lines = ['line1', 'line2', 'line3']
|
const lines = ['line1', 'line2', 'line3']
|
||||||
|
|
||||||
this.updateSender._enqueue = (uid, method, job, callback) => {
|
this.updateSender._enqueue = (uid, method, job, callback) => {
|
||||||
uid.should.equal(project_id)
|
uid.should.equal(user_id)
|
||||||
job.method.should.equal('post')
|
job.method.should.equal('post')
|
||||||
const expectedUrl = `${thirdPartyDataStoreApiUrl}/user/${user_id}/entity/${encodeURIComponent(
|
const expectedUrl = `${thirdPartyDataStoreApiUrl}/user/${user_id}/entity/${encodeURIComponent(
|
||||||
project_name
|
project_name
|
||||||
|
@ -161,7 +161,7 @@ describe('TpdsUpdateSender', function() {
|
||||||
it('deleting entity', function(done) {
|
it('deleting entity', function(done) {
|
||||||
const path = '/path/here/t.tex'
|
const path = '/path/here/t.tex'
|
||||||
this.updateSender._enqueue = function(uid, method, job, callback) {
|
this.updateSender._enqueue = function(uid, method, job, callback) {
|
||||||
uid.should.equal(project_id)
|
uid.should.equal(user_id)
|
||||||
job.method.should.equal('DELETE')
|
job.method.should.equal('DELETE')
|
||||||
const expectedUrl = `${thirdPartyDataStoreApiUrl}/user/${user_id}/entity/${encodeURIComponent(
|
const expectedUrl = `${thirdPartyDataStoreApiUrl}/user/${user_id}/entity/${encodeURIComponent(
|
||||||
project_name
|
project_name
|
||||||
|
@ -179,7 +179,7 @@ describe('TpdsUpdateSender', function() {
|
||||||
const startPath = 'staring/here/file.tex'
|
const startPath = 'staring/here/file.tex'
|
||||||
const endPath = 'ending/here/file.tex'
|
const endPath = 'ending/here/file.tex'
|
||||||
this.updateSender._enqueue = function(uid, method, job, callback) {
|
this.updateSender._enqueue = function(uid, method, job, callback) {
|
||||||
uid.should.equal(project_id)
|
uid.should.equal(user_id)
|
||||||
job.method.should.equal('put')
|
job.method.should.equal('put')
|
||||||
job.uri.should.equal(
|
job.uri.should.equal(
|
||||||
`${thirdPartyDataStoreApiUrl}/user/${user_id}/entity`
|
`${thirdPartyDataStoreApiUrl}/user/${user_id}/entity`
|
||||||
|
@ -203,7 +203,7 @@ describe('TpdsUpdateSender', function() {
|
||||||
const oldProjectName = '/oldProjectName/'
|
const oldProjectName = '/oldProjectName/'
|
||||||
const newProjectName = '/newProjectName/'
|
const newProjectName = '/newProjectName/'
|
||||||
this.updateSender._enqueue = function(uid, method, job, callback) {
|
this.updateSender._enqueue = function(uid, method, job, callback) {
|
||||||
uid.should.equal(project_id)
|
uid.should.equal(user_id)
|
||||||
job.method.should.equal('put')
|
job.method.should.equal('put')
|
||||||
job.uri.should.equal(
|
job.uri.should.equal(
|
||||||
`${thirdPartyDataStoreApiUrl}/user/${user_id}/entity`
|
`${thirdPartyDataStoreApiUrl}/user/${user_id}/entity`
|
||||||
|
|
Loading…
Reference in a new issue