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

Testing a project stores the user contribution. #1582

Closed
97amarnathk opened this issue Jun 30, 2017 · 4 comments
Closed

Testing a project stores the user contribution. #1582

97amarnathk opened this issue Jun 30, 2017 · 4 comments

Comments

@97amarnathk
Copy link

97amarnathk commented Jun 30, 2017

When a project is tested by clicking on "Test it" before publishing, it stores the answers provided by the project owner and considers them to have contributed to the task. It should be done in a sandbox mode.

@teleyinex
Copy link
Member

This behavior is as expected. Why? Because we want also to allow you to test your webhooks solution (if you have any), so we need to store everything as "it is published". When you click in the publish button, everything is cleaned, so you are all the time in a sandbox until you publish it.

@97amarnathk
Copy link
Author

97amarnathk commented Jul 12, 2017 via email

@teleyinex
Copy link
Member

Oh, then that's a bug. But in our code we can see clearly that task_runs, results, and even webhooks entries in the log are deleted (see this). Can you give us more details? Which domain object is not deleted? Also, this could be an issue with the cache, the objects in the DB are deleted but they're still cached for a few minutes. Can you check if after publishing the project you can get the task_run and results via the API?

@teleyinex teleyinex reopened this Jul 12, 2017
@teleyinex
Copy link
Member

I've been checking the code, and yes, the problem is that we have not cleaned the cache. We should add in that method the following: cached_projects.delete_project(short_name)

Good catch!

jayflo pushed a commit to bloomberg/pybossa that referenced this issue May 11, 2018
Be sure that we clean the cache after publishing the project.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants