INNER CODE UNIT · JavaScript
handleJob
csfloat/inspect · index.js:86
async function handleJob(job) {
// See which items have already been cached
const itemData = await postgres.getItemData(job.getRemainingLinks().map(e => e.link));
for (let item of itemData) {
const link = job.getLink(item.a);
if (!item.price && link.price) {
postgres.updateItemPrice(item.a, link.price);
}
gameData.addAdditionalItemProperties(item);
item = utils.removeNullValues(item);
job.setResponse(item.a, item);
}
if (!botController.hasBotOnline()) {
return job.setResponseRemaining(errors.SteamOffline);