codegasms / flux

A complete file management utility
https://flux.codegasms.com
4 stars 2 forks source link

Integrate convertor with BullMQ #31

Open aahnik opened 4 months ago

aahnik commented 4 months ago

? the mod operation should track token expenditure based on some CPU resource usage ? the mod operation should update progress

Abstract implementation of running mod operations in background

  async applyMod(modID: string, applyModDto: ApplyModDto) {
    // load the mod to apply
    // load the dto of mod params
    // check if user has rights to access fileID
    // validate mod params
    // return error if incorrect/insufficient mod params
    // create background task to process this mod
    // return task id so that people can get the status of the mod
    console.log(applyModDto);
    return modID;
  }

  async checkModOpStatus(taskID: string) {
    // validate if the requester is the creator of this task
    // check the status of the task with given task id
    // return processing if still not complete
    // return the file id of result file, and no of tokens consumed when complete
    return taskID;
  }