[Pulp-dev] Does everything live in pulp.app?

Jeff Ortel jortel at redhat.com
Thu Sep 15 19:26:07 UTC 2016



On 09/15/2016 10:47 AM, Brian Bouterse wrote:
> 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.

+1

> 
> 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?

pulp.tasks

Side note: I vote for pulp.tasking

> 
> 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".

+1

> 
> What do you think?
> 
> -Brian
> 
> _______________________________________________
> Pulp-dev mailing list
> Pulp-dev at redhat.com
> https://www.redhat.com/mailman/listinfo/pulp-dev

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 847 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/pulp-dev/attachments/20160915/92b414df/attachment.sig>


More information about the Pulp-dev mailing list