-
Notifications
You must be signed in to change notification settings - Fork 1
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
OpenEM: Add ingestor app #102
OpenEM: Add ingestor app #102
Conversation
ee1b217
to
e75e4f6
Compare
Add project structure from wails init -t svelte-ts. Add OpenEM Logo and a sample button
Adds a button to the UI to select folders and adds them to a list
Add ingestion tasks, a worker queue based on go routines and task results. Interactions with the UI are implement as well via buttons and emitted events
e75e4f6
to
d1039d4
Compare
Use viper to parse config from a yaml file. Mulitple paths are check for the config file to exist (cwd, userConfigDir, src/openem-ingestor/core)
Add launch and build task to debug service and app respectively
92f3dc3
to
372fc28
Compare
Set cwd in launch task to executable parent folder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left notes on the code, nothing set in stone though, so feel free to give counterpoints
// An extremely simple external store | ||
import { writable } from 'svelte/store' | ||
export default writable(0) | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stating the obvious again, but this should be changed later
|
c9cc973
to
d47ff5d
Compare
func (a *App) ScheduleTask(id uuid.UUID) { | ||
|
||
a.taskqueue.ScheduleTask(id) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to save them to some persistent storage, but it's not a priority for now. If the transfer never completes due to the service crashing or restarting, they can re-request ingestion, maybe with an option to use a pre-existing entry in the scicat database (or use the sourceFolder to see if there's already one).
just noticed this PR, any reason why this is supposed to become part of the scicat-cli repo and not another repo in openEm which uses the scicat-cli interface/package to connect? |
We had discussed wanting to make scicat-cli a mono repo so that versions are sync'd between the CLI, REST daemon, and admin app (this part). However, after reviewing this PR there is more app-specific top-level stuff required than I expected. |
This is a cleaned up version of the ingester app I prototyped a while ago.
The three commits show the journey from wails.io framework to the ingester framework with task queue. It should help to understand how to use wails. Each of the commits should build and compile.
What's missing from the top of my head:
runtime.emitEvent
interface)Not meant to be merged at this stage.