~time-drive-devel/time-drive/time-drive.sync

« back to all changes in this revision

Viewing changes to sync/syncaction.py

  • Committer: Rob Oakes
  • Date: 2012-11-13 17:00:21 UTC
  • Revision ID: rob.oakes@oak-tree.us-20121113170021-bmd0xa5bw4v6kf41
Continued work on real-time sync module. Finished queueing of uploads. Started work on improving backend functions through addition of custom errors.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/python
2
2
 
3
 
import os, hashlib, base64, logging, datetime
 
3
import os, hashlib, base64, logging, datetime, posixpath
4
4
from local import SyncFile
5
5
from remote import RemoteResource
6
6
import sync
165
165
 
166
166
        # Upload the file to the server
167
167
        r_ = syncfile_.uploadFile(file_url, sync_backend)
 
168
        print r_
168
169
 
169
170
        # Add to the database and save
170
171
        db_session.add(syncfile_)
186
187
 
187
188
                r_ = dbfile_.uploadFile(file_url, sync_backend)
188
189
                logging.info('Updated file uploaded to server: ' + dbfile_.name)
 
190
                print r_
189
191
 
190
192
                # Submit changes to the database - Remote Cache
191
193
                rd_filefolder, rd_filename = posixpath.split(file_url)