XYOracleNetwork/clients

View on GitHub
packages/automation-witness-server/src/Jobs/TZeroStockMarket/getTask.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { getDefaultLogger } from '@xylabs/sdk-api-express-ecs'

import { reportStockPrice } from './reportStockPrices.js'

export const getTask = () => {
  const logger = getDefaultLogger()
  const task = async () => {
    try {
      logger.log('Reporting TZero Stock Prices')
      await reportStockPrice('XYLB')
      logger.log('Reported TZero Stock Prices')
    } catch (error) {
      logger.error(error)
    }
  }
  return task
}