Opening a team project when repository is unavailable (no connection, server is down) results in error message and abortion. Version 3.6 gracefully handled such cases and opened team projects as local.
I can't access the link you provided (error 403). Maybe there is a plan how you were going to implement it? If it's not very massive I can have a look at the code and help with it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That's normal, that's a private mailing list.
The message doesn't contain much information:
Only one commit from /trunk was skipped : "Handle repository offline during
reload". Need to think should(and how) we switch to offline or no for the
new team mode implementation.
Didier
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I can think of only one inconvenience for end users in dynamic switching between online and offline modes: trying to reconnect the server(s) on every project save would take a lot of time. When the project goes offline due to lost connection with the server(s) the servers should be silently polled in a dedicated thread. So switching to online mode would happen only when the server(s) are known to be alive. If the server(s) were down during last poll, then just save the project in offline mode.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry, I will not have time for testing to the end of February.
But changes shouldn't be too hard:
1) Need to check online mode on the every check
RealProject.remoteRepository != null
2) change online mode only inside executeExclusively
3) set RealProject.preparedStatus to NONE on every change online mode
There are three methods in RealProject which check for remote remoteRepositoryProvider, and these methods don't seem to be used anythere. They are compileProjectAndCommit, teamSyncPrepare and teamSync. I don't really know what to do with them.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
compileProjectAndCommit is used in
ProjectUICommands.java
840: Core.getProject().compileProjectAndCommit(".*", true, true);
and in RealProject.java
570: compileProjectAndCommit(sourcePattern, doPostProcessing, false);
teamSynPrepare is used in SaveThread.java
106: dataEngine.teamSyncPrepare();
teamSync is used in EditorController.java
1243: Core.executeExclusively(false, Core.getProject()::teamSync);
Didier
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
And 3.6 switches back to online mode automatically when the connexion is back.
Didier
Based on this email from omegat-dev-tech, offline handling in the new team implementation was skipped with the intention of adding it later.
Last edit: Aaron Madlon-Kay 2017-02-03
I can't access the link you provided (error 403). Maybe there is a plan how you were going to implement it? If it's not very massive I can have a look at the code and help with it.
That's normal, that's a private mailing list.
The message doesn't contain much information:
Didier
I can think of only one inconvenience for end users in dynamic switching between online and offline modes: trying to reconnect the server(s) on every project save would take a lot of time. When the project goes offline due to lost connection with the server(s) the servers should be silently polled in a dedicated thread. So switching to online mode would happen only when the server(s) are known to be alive. If the server(s) were down during last poll, then just save the project in offline mode.
In 3.6, I don't remember noticing a significant waiting time while offline.
Didier
I had bad experience with GitLab. It's slow and sometimes is offline. Of course this example shouldn't be considered as a rule.
Sorry, I will not have time for testing to the end of February.
But changes shouldn't be too hard:
1) Need to check online mode on the every check
RealProject.remoteRepository != null
2) change online mode only inside executeExclusively
3) set RealProject.preparedStatus to NONE on every change online mode
Last edit: Aaron Madlon-Kay 2018-07-04
Alex, Lev is working on this issue. Shall I reassign this ticket to him?
Alex confirmed by email that Lev can have this ticket.
Lev, please take a look at Alex's comment above and adjust your PR as appropriate.
There are three methods in RealProject which check for remote remoteRepositoryProvider, and these methods don't seem to be used anythere. They are compileProjectAndCommit, teamSyncPrepare and teamSync. I don't really know what to do with them.
compileProjectAndCommit is used in
ProjectUICommands.java
840: Core.getProject().compileProjectAndCommit(".*", true, true);
and in RealProject.java
570: compileProjectAndCommit(sourcePattern, doPostProcessing, false);
teamSynPrepare is used in SaveThread.java
106: dataEngine.teamSyncPrepare();
teamSync is used in EditorController.java
1243: Core.executeExclusively(false, Core.getProject()::teamSync);
Didier
Thanks, Didier. For some reason IDEA couldn't find any usage for these methods.
I found them using "Find Usage" in NetBeans.
Didier
Committed to trunk, [r10462].
Related
Commit: [r10462]
Closed in the released version 4.1.5 update 2 of OmegaT.
Didier