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

Addon collectOutput documentation does not reflect what actually happens #2629

Closed
tiborrr opened this issue May 6, 2024 · 0 comments · Fixed by #2663
Closed

Addon collectOutput documentation does not reflect what actually happens #2629

tiborrr opened this issue May 6, 2024 · 0 comments · Fixed by #2663
Labels
bug Something isn't working or in unexpected ways joex affects the joex component

Comments

@tiborrr
Copy link
Contributor

tiborrr commented May 6, 2024

I was having a lot of problems launching my addon.

In the documentation it says

  # If true, the stdout of the program is parsed into a JSON structure
  # that is interpreted as actions executed by the task that runs the
  # addon. If the addon runs side effects only, set this to `false`
  # and the output is ignored.
  #
  # It is recommended to use this approach, if possible. It allows
  # docspell itself to apply any changes and the addon can run
  # completely isolated.
  #
  # Default is true.
  collectOutput: true

However when I was testing I saw that my addon output was not being picked up by Docspell

I had to explicitely set collectOutput: true in order for the output to be picked up by Docspel

Before log:

Mon, May 6th, 2024, 12:22: >> [rita-addon-0.17.0 (out)] {"commands": [{"itemId": "9Eakr3kCn2e-2H7so1VmWUM-LjHmNijgsrm-AP9gJjPv6DD", "actions": [{"field": "rita_id", "value": 123, "action": "set-field"}], "command": "item-update"}]}
Mon, May 6th, 2024, 12:22: Closing process: `/tmp/docspell-addons/addon-8281978260616902845/addons/rita-addon-0.17.0/addon.py /tmp/docspell-addons/addon-8281978260616902845/arguments/user-input`
Mon, May 6th, 2024, 12:22: Addon rita-addon-0.17.0 executed successfully!
Mon, May 6th, 2024, 12:22: Addon stdout:

After log:

Mon, May 6th, 2024, 14:14: >> [rita-addon-0.21.0 (out)] {"commands": [{"itemId": "4WpDnRZpHvU-WScpuVHWoAZ-fr84SHY3dR8-P3SCtBGSNVW", "actions": [{"field": "rita_id", "value": "123", "action": "set-field"}], "command": "item-update"}]}
Mon, May 6th, 2024, 14:14: Closing process: `/tmp/docspell-addons/addon-7810609369066464551/addons/rita-addon-0.21.0/addon.py /tmp/docspell-addons/addon-7810609369066464551/arguments/user-input`
Mon, May 6th, 2024, 14:14: Addon rita-addon-0.21.0 executed successfully!
Mon, May 6th, 2024, 14:14: Addon stdout: {"commands": [{"itemId": "4WpDnRZpHvU-WScpuVHWoAZ-fr84SHY3dR8-P3SCtBGSNVW", "actions": [{"field": "rita_id", "value": "123", "action": "set-field"}], "command": "item-update"}]}
Mon, May 6th, 2024, 14:14: Addon result: AddonExecutionResult(List(Success(AddonOutput(List(ItemUpdate(Ident(4WpDnRZpHvU-WScpuVHWoAZ-fr84SHY3dR8-P3SCtBGSNVW),List(SetField(Ident(rita_id),123)))),List(),List()))),true)
@eikek eikek added joex affects the joex component bug Something isn't working or in unexpected ways labels May 6, 2024
eikek added a commit that referenced this issue May 28, 2024
eikek added a commit that referenced this issue May 28, 2024
@eikek eikek added this to the Docspell 0.42.0 milestone May 28, 2024
@mergify mergify bot closed this as completed in #2663 May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working or in unexpected ways joex affects the joex component
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants