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

Add subtask input plugin #2478

Merged
merged 13 commits into from
Dec 22, 2019
Merged

Add subtask input plugin #2478

merged 13 commits into from
Dec 22, 2019

Conversation

gazpachoking
Copy link
Member

@gazpachoking gazpachoking commented Nov 5, 2019

Motivation for changes:

Be able to manipulate and filter entries before passing in to plugins like configure_series, or discover.

Detailed changes:

  • Creates a new input plugin which produces the resulting accepted entries from another task run.

Config usage if relevant (new plugin or updated schema):

tasks:
  task_a:
     mock:
      - title: blah
      accept_all: yes
  task_b:
    discover:
      what:
      - from_task: task_a
      from:
      - somewhere

To Do:

  • Do we like the name 'subtask' best? What about 'from_task'? (going with from_task)
  • Currently for logging the subtask name is parenttask>subtask is that good?
    good enough for me.
  • Should the 5 minute caching mechanism be enabled for subtask results?
    Decided against this for now at least.
  • Is there an alternative way to disable the seen plugin, or some other solution to make that not necessary?
  • Do we allow/require subtasks to be in a new root level 'subtasks' key? If not, is there a better way to prevent them from being executed by default from cli or daemon scheduling?
    Skipping this for now. Can always be added later.
  • Do we pass on the options of the parent task to the subtask? --inject is probably a very bad to pass on, but do we want/need other things passed on?
    Let's not pass any options through right now. If we discover something that should be we can re-think.

@liiight
Copy link
Member

liiight commented Nov 5, 2019

I totally get the need for this, but this feels very hacky. I think ideally we want that ability to chain tasks to each other and that should be the direction, and not neccesarily introduce new hybrid solutions like this.

@gazpachoking
Copy link
Member Author

@liiight How do you mean chain tasks?

@gazpachoking
Copy link
Member Author

I sorta like this method. It doesn't really allow anything different than clearing then saving to an entry_list and using it somewhere else, but this way feels like it might be a bit easier. I've considered chaining tasks with something similar to run_task, but that passes entries along, but that doesn't help us in cases where we want to use the entries inside discover, or configure_series

@liiight
Copy link
Member

liiight commented Nov 5, 2019

@liiight How do you mean chain tasks?

I've tried putting something down only to get something almost similar to what you did, so NM :)

@gazpachoking
Copy link
Member Author

@liiight @paranoidi @cvium Any thoughts on the TODO checklist questions? I like this method, but want to get a little feedback on those points before merging it in.

@gazpachoking
Copy link
Member Author

@liiight @paranoidi Is from_task (ala from_deluge, from_transmission) a better name than subtask?

@cvium
Copy link
Contributor

cvium commented Dec 20, 2019

from_task is clearer for me

@gazpachoking
Copy link
Member Author

from_task is clearer for me

That's the way I'm leaning as well. I think it makes it more clear it's just an input. Especially if already familiar with from_deluge etc.

@gazpachoking gazpachoking merged commit 048112a into develop Dec 22, 2019
@gazpachoking
Copy link
Member Author

Wiki update: Flexget/wiki@e336ec4

@metaMMA
Copy link
Contributor

metaMMA commented Dec 27, 2019

Does the flexget.com search database need to be updated when adding new plugins? I searched for "from_task" in the search bar on flexget.com "https://flexget.com/_search?q=from_task" but it comes up empty. I guessed the url and it took me to the page, so I know it DOES exist. I think there may have been a handful of other plugins that don't come up in a search, too. But I cannot remember which ones...

@gazpachoking
Copy link
Member Author

Does the flexget.com search database need to be updated when adding new plugins? I searched for "from_task" in the search bar on flexget.com "https://flexget.com/_search?q=from_task" but it comes up empty. I guessed the url and it took me to the page, so I know it DOES exist. I think there may have been a handful of other plugins that don't come up in a search, too. But I cannot remember which ones...

Seems like maybe the search index update was getting bypassed when syncing from the github repo (or something.) I've added a weekly cronjob to re-index, hopefully that keeps things working better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants