-
Notifications
You must be signed in to change notification settings - Fork 69
feat: Concurrent executions with indexedDB #1235
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
Changes from 4 commits
26e5724
e168a9a
6fc0304
117405f
a8a6614
047f00d
b91218f
58f6d06
c80a929
9d3f7e3
4e522fe
1c0f14c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. all of the methods are returning |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,26 @@ | ||
| import { DB_CONFIG, ExecutionHistoryEntry } from '../model/executionHistory'; | ||
| import { | ||
| DB_CONFIG, | ||
| ExecutionHistoryEntry, | ||
| } from '../model/backend/gitlab/types/executionHistory'; | ||
|
|
||
| /** | ||
| * Service for interacting with IndexedDB | ||
| * Interface for IndexedDB operations | ||
| */ | ||
| class IndexedDBService { | ||
| export interface IIndexedDBService { | ||
|
||
| init(): Promise<void>; | ||
| addExecutionHistory(entry: ExecutionHistoryEntry): Promise<string>; | ||
| updateExecutionHistory(entry: ExecutionHistoryEntry): Promise<void>; | ||
| getExecutionHistoryById(id: string): Promise<ExecutionHistoryEntry | null>; | ||
| getExecutionHistoryByDTName(dtName: string): Promise<ExecutionHistoryEntry[]>; | ||
| getAllExecutionHistory(): Promise<ExecutionHistoryEntry[]>; | ||
| deleteExecutionHistory(id: string): Promise<void>; | ||
| deleteExecutionHistoryByDTName(dtName: string): Promise<void>; | ||
| } | ||
|
|
||
| /** | ||
| * For interacting with IndexedDB | ||
| */ | ||
| class IndexedDBService implements IIndexedDBService { | ||
| private db: IDBDatabase | null = null; | ||
|
||
|
|
||
| private dbName: string; | ||
|
|
||
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| import { Dispatch, SetStateAction } from 'react'; | ||
| import { ThunkDispatch, Action } from '@reduxjs/toolkit'; | ||
| import { RootState } from 'store/store'; | ||
|
||
| import DigitalTwin from 'preview/util/digitalTwin'; | ||
|
||
|
|
||
| export interface PipelineStatusParams { | ||
| setButtonText: Dispatch<SetStateAction<string>>; | ||
| digitalTwin: DigitalTwin; | ||
| setLogButtonDisabled: Dispatch<SetStateAction<boolean>>; | ||
| dispatch: ReturnType<typeof import('react-redux').useDispatch>; | ||
| executionId?: string; | ||
| } | ||
|
|
||
| export type PipelineHandlerDispatch = ThunkDispatch< | ||
| RootState, | ||
| unknown, | ||
| Action<string> | ||
| >; | ||
|
|
||
| export interface JobLog { | ||
|
||
| jobName: string; | ||
| log: string; | ||
| } | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please make sure that there are no circular dependencies |
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The coding idioms in |
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.
Why is this react component here?