Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of successful upload check #377

Open
ehsan6sha opened this issue Jul 19, 2023 · 0 comments
Open

Implementation of successful upload check #377

ehsan6sha opened this issue Jul 19, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request
Projects

Comments

@ehsan6sha
Copy link
Member

ehsan6sha commented Jul 19, 2023

Right now when an asset is sent to be uploaded, it assumes the upload is completed. It needs to check and ensure upload is done and retry if not.

inprogress_cidlist = []
when app starts:
fula.checkFailedActions(false, 15) => If not false => failedCids = fula.listFailedActions() => inprogress_cidlist.push(failedCids) :just make sure we do not double add a cid and it is unique inside inprogress_cidlist

when we upload: (The part after 5 second delay should still wait for more time if the procedure in "Now during the app" is running at the same time so a shared flag is needed)
if writeFile is true => show file as in progress => get the rootCid of latest uploaded file in that batch => after 5 seconds delay to give it some time to upload: fula.listFailedActions([rootCid]) => If not false => inprogress_cidlist .push(root_cid) :just make sure we do not double add a cid and it is unique inside inprogress_cidlist

Now during the app: (This should be skipped on the cycle when the upload is running at the same time so a shared flag is needed)
If inprogress_cidlist.length>0 => activate a timer every 30 sec => {fula.connectionCheck => if true => checkFailedActions(true, 15) => if true => inprogress_cidlist=await fula.listFailedActions()}

In checkFailedActions age avalin input true bashe khodesh ham check mikone va ham upload. dovomin parametresham timeoute
listFailedActions ham age input dashte bashe ke faghat oona ro check mikone va age bi inut bashe hameye failed ha ro barmigardoone


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@ehsan6sha ehsan6sha added the enhancement New feature or request label Jul 19, 2023
@ehsan6sha ehsan6sha added this to Not started in Development via automation Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development
Not started
Development

No branches or pull requests

2 participants