I'm thinking of this in the context of my conversion of the tasking system to use the new Django-based models. As part of that transition the "tasking system code" is moving out of pulp/server/pulp/server/async/* and moving into pulp/app/pulp/app/tasks/* This will make imports to taking system code import from pulp.app.tasks

I'm wondering if moving it to pulp.tasks would be a better home? Along with that line of thinking, we would only put code in the Django app which Django uses. Views, Models, Migrations, Settings, Middleware. Things like that.

This would cause any number of python packages to live as pulp.<mypackagename> instead of pulp.app.<mypackagename>

In summary, my two questions are:

1) Should a thing like the tasks module live in pulp.app.tasks or pulp.tasks?

2) If it does live at pulp.app.tasks should we always import it as pulp.app.tasks or should I instead do:

from django.db.models import get_app
pulp_tasks_module = get_app('pulp').tasks

Right now I lean towards placing the code at pulp.tasks and using normal Python importing like "from pulp import tasks".

What do you think?

-Brian

_______________________________________________
Pulp-dev mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/pulp-dev

Reply via email to