owncloud / owncloud/ios-app

[BUG] OCItemTracker never returns OCCore

Open
#626 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
251
Forks
142
Avg merge
2d 17h
Merged PRs (30d)
3

Description

Just noted OCItemTracker requests an instance of OCCore from OCCoreManager, but doesn't return it.

This shouldn't really matter if the shortcuts appex is only short-lived and terminated after running the tasks.

If the appex is kept alive by the Shortcuts app, I'd like to propose returning the core to the OCCoreManager 10 seconds after an action has Shortcuts action has completed.

Why 10 seconds? To open a time window within which the running OCCore can be "re-used" by the next shortcuts action without the overhead and delay of starting a new instance - but also to make sure it's properly terminated eventually.

To implement this, OCItemTracker could

  • return a taskCompletionHandler to the completionHandler, which the action using OCItemTracker could call when it has completed its task.
  • return the OCCore to OCCoreManager from within the taskCompletionHandler that was called by the action after finishing.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how OCItemTracker requests OCCore from OCCoreManager and how Shortcuts actions signal completion. Check the actions using OCItemTracker to understand the proposed taskCompletionHandler flow. Done means the core can be reused for 10 seconds after completion and is then returned to OCCoreManager.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.