Skip to content

Commit

Permalink
FEAT(#508): Linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tholulomo committed Aug 20, 2024
1 parent f44264b commit 6a8f7d0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions resfulservice/src/sw/utils/worker-services.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ let fetchedTime = null;
let fetchedDate = null;

// Function to fetch the current time from the API
async function fetchCurrentTime() {
async function fetchCurrentTime () {
log.info('fetchCurrentTime(): Function entry');
try {
const response = await axios.get(TIME_API_URL);
Expand All @@ -43,7 +43,7 @@ async function fetchCurrentTime() {
}

// Function to calculate the remaining time until 12:00 AM in the correct timezone
function getRemainingTimeUntilMidnight() {
function getRemainingTimeUntilMidnight () {
log.info('getRemainingTimeUntilMidnight(): Function entry');
const now = new Date();
const timezoneOffset = now.getTimezoneOffset() * 60000;
Expand All @@ -60,7 +60,7 @@ function getRemainingTimeUntilMidnight() {
}

// Function to check if the current time is between 12:00 AM and 3:00 AM
function isNightTime() {
function isNightTime () {
log.info('isNightTime(): Function entry');
if (fetchedTime !== null) {
const startTime = new Date(fetchedTime);
Expand All @@ -74,7 +74,7 @@ function isNightTime() {
}

// Function to update fetched time and date periodically
async function updateTimeIfNecessary() {
async function updateTimeIfNecessary () {
log.info('updateTimeIfNecessary(): Function entry');
const now = new Date();
const timezoneOffset = now.getTimezoneOffset() * 60000;
Expand Down Expand Up @@ -113,7 +113,7 @@ const serviceManager = {
}
};

async function workerManager(logger) {
async function workerManager (logger) {
const tasks = await Task.find({
status: { $nin: [TaskStatusMap.MISSING, TaskStatusMap.DISABLED] }
});
Expand Down Expand Up @@ -162,7 +162,7 @@ async function workerManager(logger) {
});
}

async function convertImageToPng({ _id, info: { ref, sampleID } }, logger) {
async function convertImageToPng ({ _id, info: { ref, sampleID } }, logger) {
logger.info('Worker-services.convertImageToPng - Function entry');
const pngFilePath = `${ref.split(/.tiff?/)[0]}.png`;
const pngFile = pngFilePath.split('mm_files/')[1];
Expand Down Expand Up @@ -304,7 +304,7 @@ async function convertImageToPng({ _id, info: { ref, sampleID } }, logger) {
}
}

async function knowledgeRequest(
async function knowledgeRequest (
{ _id: uuid, info: { knowledgeId, req } },
logger
) {
Expand Down Expand Up @@ -357,7 +357,7 @@ const isObjectExistInMinio = async (bucketName, fileName) => {
}
};

async function checkFileExistence(filePath) {
async function checkFileExistence (filePath) {
try {
await fs.promises.access(filePath, fs.constants.F_OK);
return true;
Expand Down

0 comments on commit 6a8f7d0

Please sign in to comment.