Changeset - 46ed8c369e66
[Not reviewed]
3 1 0
Lance Edgar (lance) - 3 years ago 2021-12-23 12:31:23
lance@edbob.org
Remove deprecated "dbsync" logic

that has been superseded by "datasync" for years now...
4 files changed with 0 insertions and 505 deletions:
0 comments (0 inline, 0 general)
rattail/commands/core.py
Show inline comments
 
@@ -588,51 +588,12 @@ class DateOrganize(Subcommand):
 
                    datedir = os.path.join(args.folder, datedir)
 
                    if not os.path.exists(datedir):
 
                        os.makedirs(datedir)
 
                    shutil.move(path, datedir)
 

	
 

	
 
class DatabaseSyncCommand(Subcommand):
 
    """
 
    Controls the database synchronization service.
 
    """
 

	
 
    name = 'dbsync'
 
    description = "Manage the database synchronization service"
 

	
 
    def add_parser_args(self, parser):
 
        subparsers = parser.add_subparsers(title='subcommands')
 

	
 
        start = subparsers.add_parser('start', help="Start service")
 
        start.set_defaults(subcommand='start')
 
        stop = subparsers.add_parser('stop', help="Stop service")
 
        stop.set_defaults(subcommand='stop')
 

	
 
        if sys.platform == 'linux2':
 
            parser.add_argument('-p', '--pidfile',
 
                                help="Path to PID file", metavar='PATH')
 
            parser.add_argument('-D', '--do-not-daemonize',
 
                                action='store_false', dest='daemonize', default=True,
 
                                help="Do not daemonize when starting.")
 

	
 
    def run(self, args):
 
        from rattail.db.sync import linux as dbsync
 

	
 
        if args.subcommand == 'start':
 
            try:
 
                dbsync.start_daemon(self.config, args.pidfile, args.daemonize)
 
            except KeyboardInterrupt:
 
                if not args.daemonize:
 
                    self.stderr.write("Interrupted.\n")
 
                else:
 
                    raise
 

	
 
        elif args.subcommand == 'stop':
 
            dbsync.stop_daemon(self.config, args.pidfile)
 

	
 

	
 
class Dump(Subcommand):
 
    """
 
    Do a simple data dump.
 
    """
 

	
 
    name = 'dump'
rattail/db/sync/__init__.py
Show inline comments
 
deleted file
rattail/db/sync/linux.py
Show inline comments
 
deleted file
rattail/db/sync/win32.py
Show inline comments
 
deleted file
0 comments (0 inline, 0 general)