[BUG] OCItemTracker never returns OCCore
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
taskCompletionHandlerto thecompletionHandler, which the action usingOCItemTrackercould call when it has completed its task. - return the
OCCoretoOCCoreManagerfrom within thetaskCompletionHandlerthat was called by the action after finishing.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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