-
-
Notifications
You must be signed in to change notification settings - Fork 81
Syncing #62
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
Merged
Merged
Syncing #62
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
58904ba
binary now uses the library (removing duplicate imports), added basic…
ErikBjare 7494895
fixed tests
ErikBjare c93c8a0
progress on syncing
ErikBjare dee8ee5
datastore: fix blinking test
johan-bjareholt e09717e
improved logging output, added minor test
ErikBjare 7159b77
major progress on syncing, added tests
ErikBjare c143fd5
cleaned up code, added comments
ErikBjare 94cb00d
added workaround for low-precision clocks
ErikBjare dc9d88d
moved sync-files into subfolder
ErikBjare 926bcd6
Merge branch 'master' into dev/syncing
ErikBjare 7c16e89
renamed commit to force_commit
ErikBjare 672e20d
added sync origin to bucket data
ErikBjare 6280ada
fixed type error and got cfg'd out lazy_static on non-Android platforms
ErikBjare File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| #[macro_use] extern crate log; | ||
|
|
||
| use aw_server::*; | ||
|
|
||
| fn main() { | ||
| // What needs to be done: | ||
| // - [x] Setup local sync bucket | ||
| // - Import local buckets and sync events from aw-server (either through API or through creating a read-only Datastore) | ||
| // - Import buckets and sync events from remotes | ||
|
|
||
| println!("Started aw-sync-rust..."); | ||
| logging::setup_logger().expect("Failed to setup logging"); | ||
|
|
||
| aw_server::sync::sync_run(); | ||
| info!("Finished successfully, exiting..."); | ||
|
|
||
| // Needed to give the datastores some time to commit before program is shut down. | ||
| // 100ms isn't actually needed, seemed to work fine with as little as 10ms, but I'd rather give | ||
| // it some wiggleroom. | ||
| std::thread::sleep(std::time::Duration::from_millis(100)); | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Remove
Uh oh!
There was an error while loading. Please reload this page.
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 won't until we've fixed the commit-before-get. If I do I have to put
ds.force_commit()after practically everyds.insert_events()which is really annoying and hard to debug.