Open ValeErre87 opened 8 years ago
@ValeErre87 just to be clear, are you trying to export tasks or task runs?
@othieno I tried to export task runs (in CVS format).
@ValeErre87 I seem to have found a temporary solution to this. Could you try exporting and let me know if you're having issues?
For future reference (beware, here be dragons): Why is this happening? PyBossa creates a zip file (for instance, here's how a zipped JSON export is created) which it then caches (since the creation operation can be fairly expensive) and uploads to the requester.
From my understanding, the problem is that the once a file is cached it is never updated and is always returned when an export is requested, which breaks the assumption that up-to-date task run data can be requested at any moment.
A very quick and temporary solution is to delete the cached file, thereby forcing PyBossa to regenerate a more recent export, however this process will have to be repeated each time an export is requested. An ideal solution would be comparing the date and time the cached file was created (T_created) and the project data was last updated (T_last_updated). If T_created < T_last_updated, then the cache is updated.
I'll keep this issue open until I can push a more permanent solution.
Note: This bug has already been mentioned in issue #56.
@othieno Hey Jeremy, thank you for fixing this. It works now. I am a bit concerned we will face the same issue next month, when I will need to export the same tasks again. I'll keep you posted.
We need to fix some bugs we are experiencing when exporting the CVS file related to number of tasks run.
In theory, we should get an updated export every time we try to export the file from the web interface. Unfortunately, this is not happening, so the file I obtain while exporting is not updated.