summaryrefslogtreecommitdiffstats
path: root/combox/events.py
Commit message (Collapse)AuthorAgeFilesLines
* Copyright changed.Siddharth Ravikumar2016-03-011-1/+1
| | | | From combox contributors -> Dr. Robert C. Green II.
* Rewrote/Added docstrings in combox.events module.Siddharth Ravikumar2016-01-021-35/+210
| | | | They're sphinx friendly now.
* authors -> contributors.Siddharth Ravikumar2015-12-221-1/+1
|
* .py files coding set to utf-8.Siddharth Ravikumar2015-12-221-0/+2
|
* Now use `os.renames` instead `os.rename` function.Siddharth Ravikumar2015-12-211-1/+1
|
* Accounted for watchdog's weirdess.Siddharth Ravikumar2015-12-211-2/+22
| | | | This fixes two tests that were failing on OS X.
* Now ComboxDirMonitor uses Lock. Addresses bug#11.Siddharth Ravikumar2015-11-191-44/+53
|
* Updated combox.events.ComboxDirMonitor and combox.events.NodeDirMonitor. See ↵rsiddharth2015-11-081-2/+58
| | | | | | ChangeLog. Changes related to bug#10.
* combox now uses python's logging module instead of `print` to stdout ↵Siddharth Ravikumar2015-10-171-31/+37
| | | | | | | | | | information/errors. modified: ChangeLog modified: combox/cbox.py modified: combox/events.py modified: combox/file.py modified: combox/log.py
* combox/events.py: fixed tmp_file method.Siddharth Ravikumar2015-09-291-2/+2
|
* [bug fix] fix for :b#2:Siddharth Ravikumar2015-09-291-1/+26
| | | | | | | | | Now combox ignores tmp files created by editors. modified: TODO.org modified: combox/events.py modified: tests/events_test.py modified: tests/utils.py
* fix for bug #8.Siddharth Ravikumar2015-09-121-1/+3
|
* fix for bug #6Siddharth Ravikumar2015-09-121-2/+11
| | | | | Now, we check if the directory contains files, if it does, then we delay the deletion of the directory.
* combox.events: plaftorm specific changes.Siddharth Ravikumar2015-09-071-7/+20
| | | | | | In NodeDirMonitor's on_moved method, when we detect that a shard is modified, we push the info, about the shard modification, to silo from the on_moved for the OS X platform.
* combox.events: fixed file path variable name in NodeDirMonitor's on_move method.Siddharth Ravikumar2015-09-071-5/+5
|
* combox.events: fixed deadlock issue.Siddharth Ravikumar2015-09-071-8/+7
|
* combox.events: fixes a dropbox specific issue.Siddharth Ravikumar2015-09-071-5/+8
|
* combox.events: updated/added print statemets for debugging.Siddharth Ravikumar2015-09-061-1/+2
|
* combox.events: added `print' statements; helpful for debugging.Siddharth Ravikumar2015-09-061-1/+9
|
* Wrote a fix for Google Drive client behavior for file modification.Siddharth Ravikumar2015-09-061-8/+59
| | | | | | | | | | The unit test that simulates the behavior of Google Drive for file modification runs successfully, but I need to test this fix, with the Google Drive client monitoring a node directory, to confirm if the fix actually works. modified: combox/events.py modified: tests/events_test.py
* combox.events: added print statements in NodeDirMonitor.events for debugging.Siddharth Ravikumar2015-08-271-0/+3
|
* combox/events.py: fixed a logical error in NodeDirMonitor.on_movedSiddharth Ravikumar2015-08-271-1/+2
|
* combox/events.py: fixed a logical mistake in the last commit.Siddharth Ravikumar2015-08-271-1/+1
|
* fixed dropbox specific issue in NodeDirMonitor.housekeep method.Siddharth Ravikumar2015-08-271-1/+2
| | | | modified: combox/events.py
* Fix for Dropbox weirdness.Siddharth Ravikumar2015-08-261-15/+47
| | | | modded combox/events.py
* combox/events.py: bugfix (Dropbox specific code).Siddharth Ravikumar2015-08-261-2/+4
|
* combox/events.py: fixed a Dropox specific issue :|Siddharth Ravikumar2015-08-261-5/+22
|
* combox/events.py: fixed Dropbox specific issue.Siddharth Ravikumar2015-08-261-4/+13
|
* fixed a Dropbox specific issue in NodeDirMonitor.Siddharth Ravikumar2015-08-261-3/+21
| | | | | modified: TODO.org modified: combox/events.py
* bug fix (b#4).Siddharth Ravikumar2015-08-251-1/+8
| | | | | modified: TODO.org modified: combox/events.py
* combox/events.py: fixed typo in comment.Siddharth Ravikumar2015-08-241-1/+1
|
* Updated combox.events.NodeDirMonitor.housekeep's 're-construct file' ↵Siddharth Ravikumar2015-05-011-24/+33
| | | | | | | | | | | | | | | | | | | | functionality. - Now the housekeep method re-contructs the files, whose shards were created when combox was off, in the combox directory only if all of its shards have made it to the respective node directories. - If it finds only some of all the shards of a file missing, it stores this information in the `file_created' dict inside the silo. - tests.events_tests.TestEvents.test_NDM_housekeep_create tests the 're-construct file' functionality of combox.events.NodeDirMonitor.housekeep method. modified: combox/events.py modified: tests/events_test.py
* added comments in combox.events.NodDirMonitor.housekeep method.Siddharth Ravikumar2015-05-011-0/+3
|
* Updated combox.events.NodeDirMonitor.housekeep's delete functionality.Siddharth Ravikumar2015-04-301-10/+16
| | | | | | | | | | | | | | | | | | - Now the housekeep method deletes the file in the combox directory only if all of its shards are missing in the respective node directories -- meaning it was deleted on another computer (running combox). - If it finds only some of all the shards of a file missing, it stores this information in the `file_deleted' dict inside the silo. - tests.events_tests.TestEvents.test_NDM_housekeep_delete tests the delete functionality of combox.events.NodeDirMonitor.housekeep method. modified: combox/events.py modified: tests/events_test.py
* rewrote combox.events.NodeDirMonitor.on_moved method.Siddharth Ravikumar2015-04-221-4/+11
| | | | | | | | | | | | | - Now the node monitor waits for all shards of the file, which was moved/renamed on a remote computer, to get moved/renamed on this computer, before it finally reconstructs the moved/renamed file in the combox directory on this computer. - Updated the tests for on_moved method at tests.events_test.TestEvents.test_NDM_onmoved method. modified: combox/events.py modified: tests/events_test.py
* rewrote combox.events.NodeDirMonitor.on_deleted method.Siddharth Ravikumar2015-04-151-6/+20
| | | | | | | | | | | | | | | | | | | | | - Now the the node monitor waits for all shards of the file, which was deleted on a remote computer, to get deleted on this computer, before it finally deletes the respective file in the combox directory. - Tests for it is at tests.events_test.TestEvents.test_NDM_ondeleted method. modified: combox/events.py modified: tests/events_test.py Did some of this while listening to Cat Stevens' (Yusuf): - Just Another Night - Wild World - Father and son (*) - Peace train - Moonshadow (*)
* rewrote combox.events.NodeDirMonitor.on_modified method.Siddharth Ravikumar2015-04-081-3/+8
| | | | | | | | | | | | | | | | - Now the the node monitor waits for all shards of the file, which was modified on a remote computer, to arrive on this computer, before it re-constructs the file into the respective location in the combox directory. - Tests for it is at tests.events_test.TestEvents.test_NDM_onmodified method. modified: combox/events.py modified: tests/events_test.py Part of this was done while listening to Avril's "Complicated" ; I think this is the only modern Pop song which I like.
* After a file which was created a in a remote computer is reconstructed in ↵Siddharth Ravikumar2015-04-081-0/+2
| | | | | | | this computer, its info is removed from the 'file_created' dictionary in the silo. modified: combox/events.py modified: tests/events_test.py
* [golden commit]: rewrote combox.events.NodeDirMonitor.on_created method.Siddharth Ravikumar2015-04-011-5/+17
| | | | | | | | | | | | | | | | | | | | | - Now the the node monitor waits for all shards of the file, which was created on a remote computer, to arrive on this computer, before it re-constructs the file into the respective location in the combox directory. - Tests for it is at tests.events_test.TestEvents.test_NDM_oncreate method. - The main test method, tests.events_test.TestEvents.test_NDM, was disabled by renaming it to tests.events_test.TestEvents.test_NDM. - Now the NodeDirMonitor requires passing the 'node monitor lock' when creating an instance of it. :~( modified: combox/events.py modified: tests/events_test.py
* new variable at NodeDirMonitor -- `num_nodes'Siddharth Ravikumar2015-04-011-0/+2
| | | | | | | `num_nodes' a value that represents the number of node directories. modified: combox/events.py modified: tests/events_test.py
* Now combox.silo.ComboxSilo reloads db from disk before reading/writing.Siddharth Ravikumar2015-04-011-24/+0
| | | | | modified: combox/events.py modified: combox/silo.py
* refactored the way locks work in combox.siloComboxSilo.Siddharth Ravikumar2015-04-011-6/+7
| | | | | | | | modified: combox/cbox.py modified: combox/events.py modified: combox/silo.py modified: tests/events_test.py modified: tests/silo_test.py
* ComboxSilo is now going to have dictionaries that track information about ↵Siddharth Ravikumar2015-03-311-2/+9
| | | | | | | the shards. modified: combox/events.py modified: combox/silo.py
* combox.events.NodDirMonitor: corrected typo in docstring.Siddharth Ravikumar2015-03-261-1/+1
|
* fleshed out combox.events.NodDirMonitor.housekeep method.Siddharth Ravikumar2015-03-261-1/+49
| | | | | | | wrote tests for it too :~( modified: combox/events.py modified: tests/events_test.py
* fleshed out the on_move method in combox.events.NodeDirMonitorSiddharth Ravikumar2015-03-181-0/+15
| | | | | | | As usual, wrote correponding tests for it; zarking TDD or whatever :~| modified: combox/events.py modified: tests/events_test.py
* updated on_created, on_modified, on_deleted methods in NodeDirMonitor.Siddharth Ravikumar2015-03-131-0/+15
| | | | | | | Now they check if the event.src_path is a shard or a directory before doing anything. modified: combox/events.py
* Added `shardp' method to combox.events.NodeDirMonitor + test for it.Siddharth Ravikumar2015-03-131-0/+11
| | | | | modified: combox/events.py modified: tests/events_test.py
* updated on_delete method in combox.events.NodeDirMonitorSiddharth Ravikumar2015-03-061-1/+1
| | | | | | | Now the method deletes the corresponding file in the combox directory only if has not already been deleted. modified: combox/events.py
* updated the on_delete method in the combox.events.ComboxDirMonitor class.Siddharth Ravikumar2015-03-061-2/+5
| | | | | | | It now deletes the directory or file shard in the node directories only if they were not already deleted. modified: combox/events.py