TpdsQueueManager.mjs 410 B

1234567891011121314151617
  1. import Settings from '@overleaf/settings'
  2. import OError from '@overleaf/o-error'
  3. import { fetchJson } from '@overleaf/fetch-utils'
  4. async function getQueues(userId) {
  5. try {
  6. return await fetchJson(`${Settings.apis.tpdsworker.url}/queues/${userId}`)
  7. } catch (err) {
  8. throw OError.tag(err, 'failed to query TPDS queues for user', { userId })
  9. }
  10. }
  11. export default {
  12. promises: {
  13. getQueues,
  14. },
  15. }