doit icon indicating copy to clipboard operation
doit copied to clipboard

add support for non-serializable `getargs`

Open schettino72 opened this issue 10 years ago • 4 comments

See initial discussion on: https://groups.google.com/d/topic/python-doit/c1ZK4GNJkSw/discussion

One important consideration is that task that creates non-serializable values can never be considered up-to-date, otherwise a task that uses this value would fail.

There are 2 ways to implement this:

  1. The action would wrap the returned value in a custom doit Object that indicates it should not be serialized. It will be up to the user to make sure the task is never up-to-date.

  2. add a new attribute to a task to indicate its result/values are not serializable.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

schettino72 avatar Aug 18 '15 09:08 schettino72

@FrankStain I suggested option 1 in the email... but thinking over I guess option 2 would be better. What do you think? What would work best for your use-case?

schettino72 avatar Aug 18 '15 09:08 schettino72

@schettino72 First variant looks more flexible as for doit customers as for it's development. Looks like a kind of envelope where object is stored by one task to be taken by another.

And about 'never-up-to-date' i can say that currently i need to use 'uptodate': [False] for all such tasks to schedule it's execution every pipeline launch. So it's good idea consider such tasks to be never up-to-date.

FrankStain avatar Aug 18 '15 21:08 FrankStain

This is done but docs are too superficial:

https://pydoit.org/cmd_run.html#codec-cls

schettino72 avatar Dec 10 '19 16:12 schettino72

OK, I'll fix up the docs in January. Thanks for taking a look.

rbdixon avatar Dec 20 '19 18:12 rbdixon