diff --git a/src/common/helper.js b/src/common/helper.js index 7c4ff3b..c618687 100644 --- a/src/common/helper.js +++ b/src/common/helper.js @@ -119,33 +119,6 @@ async function getAttributes (token) { } } -/** - * Get all skills - * * Unused for now. Retained for any future use - * @param {String} token - * @returns a map (name -> id) - */ -async function getSkillProviderId (token) { - const res = await axios.get(`${config.UBAHN_API_URL}/skillsProviders`, { headers: { Authorization: `Bearer ${token}` }, params: { name: config.SKILL_PROVIDER_NAME } }) - if (res.data && res.data.length > 0) { - return res.data[0].id - } -} - -/** - * Get the skillId - * * Unused for now. Retained for any future use - * @param {String} skillProviderId - * @param {String} name - * @param {String} token - */ -async function getSkillId (skillProviderId, name, token) { - const res = await axios.get(`${config.UBAHN_API_URL}/skills`, { headers: { Authorization: `Bearer ${token}` }, params: { skillProviderId, name } }) - if (res.data && res.data.length > 0) { - return res.data[0].id - } -} - /** * Returns the member location for the member handle * * Unused for now. Retained for any future use @@ -253,8 +226,6 @@ module.exports = { getTopcoderToken, getOrganizationId, getAttributes, - getSkillProviderId, - getSkillId, getMemberLocation, getMemberSkills, createUser, diff --git a/src/services/ProcessorService.js b/src/services/ProcessorService.js index 9949fe7..4c3375a 100644 --- a/src/services/ProcessorService.js +++ b/src/services/ProcessorService.js @@ -65,22 +65,22 @@ async function processCreate (message, ubahnToken) { isInactive: !message.payload.active }, ubahnToken) logger.info(`external profile: ${organizationId} created`) - await helper.sleep() + //await helper.sleep() await helper.createUserAttribute(userId, _.get(attributes, 'isAvailable'), message.payload.active.toString(), ubahnToken) logger.info('user attribute: isAvailable created') - await helper.sleep() + //await helper.sleep() await helper.createUserAttribute(userId, _.get(attributes, 'company'), 'Topcoder', ubahnToken) logger.info('user attribute: company created') - await helper.sleep() + //await helper.sleep() await helper.createUserAttribute(userId, _.get(attributes, 'title'), 'Member', ubahnToken) logger.info('user attribute: title created') - await helper.sleep() + //await helper.sleep() await helper.createUserAttribute(userId, _.get(attributes, 'location'), location, ubahnToken) logger.info('user attribute: location created') // Custom attribute. May or may not exist if (_.get(attributes, 'email')) { - helper.sleep() + //helper.sleep() await helper.createUserAttribute(userId, _.get(attributes, 'email'), message.payload.email, ubahnToken) logger.info('user attribute: email created') }