genouest / biomaj

BioMAJ
http://genouest.github.io/biomaj/
GNU Affero General Public License v3.0
12 stars 10 forks source link

Can't restart from-task after a non-updated bank #48

Closed horkko closed 8 years ago

horkko commented 8 years ago

Hi,

I've noticed it not possible to re-launch postprocess(es) from a bank if this bank has been updated but the previous release number was the same. e.g.:

$ biomaj-cli.py --update --bank foobar
 ...
[workflow.py:wf_release:427] Workflow:wf_release:previous_session:76
[workflow.py:wf_release:549] Workflow:wf_release:same_as_previous_session
[workflow.py:wf_over:225] Workflow:wf_over
...

Now if I've modified the postprocess (added a new task) and I want to create new files with this new task from the current releas it is not possible:

$ biomaj-cli.py --update --bank foobar --from-task postprocess --process FORMATS
...
[bank.py:update:1042] Bank:foorbar:Update
[bank.py:update:1060] Bank:foobar:Release:latest
[bank.py:update:1070] Previous task download was not successful, cannot restart after this task

Indeed, sessions.status.download is set to False in MongoDB where as sessions.workflow_status is set to True. Don't you think we should check also sessions.workflow_status to decide whether or not to retstart a workflow?

To be able to create new files from our new task, we need to restart from scratch :( --from-scratch which is not I want as all the postprocesses are taking ages to complete.

Emmanuel

osallou commented 8 years ago

I have to check how sessions status are managed (on re-update, when flow is complete etc...) status is certainly reset once workflow is complete.

osallou commented 8 years ago

did you try specify the release when executing the from-task ? (--release)

horkko commented 8 years ago

No, I wanted to, but I had to remove pending first ;) I've launched a command, it seems to work, at least no error for now

osallou commented 8 years ago

the update loads a session from the release option, else it starts with a new session (so no status).

horkko commented 8 years ago

Ok, I thought it was able to find the 'current' release and set it to restart from-task. It works otherwise. Thanks