Skip to content
This repository has been archived by the owner on Jul 7, 2024. It is now read-only.
/ Orion Public archive

Persist activities to a file #169

Merged
merged 5 commits into from
Aug 8, 2018
Merged

Conversation

kernelwhisperer
Copy link
Contributor

What changed?

Activities will now persist when orion will quit.

app/index.js Outdated
@@ -35,6 +36,7 @@ import ActivitiesWindow from './windows/Activities/window'
app.mainWindow = null

// activities window
const activityLogPath = pathJoin(app.getPath('userData'), 'activity.log')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.json?

Copy link
Member

@koalalorenzo koalalorenzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I have an "active" and not completed acitivy, it will be saved with the old percentage. What should we do about it? Should we ignore them and save only the complete activities? Should we resume them? Or should we mark them as "interrupted"?

@koalalorenzo
Copy link
Member

To test the change request, just create a big file, then add it. Then close the app and re open it with the Activity List.

screen shot 2018-08-08 at 13 20 23

@kernelwhisperer
Copy link
Contributor Author

Hmm, is it possible to resume them?

@koalalorenzo
Copy link
Member

koalalorenzo commented Aug 8, 2018

I don't think so. :( For now at least.

We need a different UI/structure to report failures, allow retry etc etc etc
The fact is that those actions could fail when resuming them: if the file is not there anymore we need to take care of that.

What do you think?

@kernelwhisperer
Copy link
Contributor Author

Alright, let's mark them as "interrupted" then :)

@koalalorenzo
Copy link
Member

We have a bug, while I was just adding a big file to test it, it did not appear on the list of the activities. but when it was completed it was there.

https://sentry.io/siderus-opensource/orion/issues/635560601/?environment=development

Copy link
Member

@koalalorenzo koalalorenzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, tested on MacOS manually

@kernelwhisperer kernelwhisperer merged commit 1ca5bfe into master Aug 8, 2018
@kernelwhisperer kernelwhisperer deleted the feature/persist-activities branch August 8, 2018 17:16
@koalalorenzo koalalorenzo mentioned this pull request Aug 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants