taskbridgeapp.gui.viewmodel.threadedtasks.Sync

class taskbridgeapp.gui.viewmodel.threadedtasks.Sync(sync_reminders, sync_notes, cb, prune_reminders=False)

Bases: QThread

Thread which carries out the main synchronisation for both notes and reminders.

Methods

run

Carries out the synchronisation process.

Attributes

__display_name__

__name__

__orig_bases__

__sphinx_decorator_args__

__sphinx_mock__

__call__(*args, **kwargs)

Call self as a function.

Return type:

Any

__init__(sync_reminders, sync_notes, cb, prune_reminders=False)

Initialises the synchronisation process.

Parameters:
  • sync_reminders (bool) – if True, reminders will be synced.

  • sync_notes (bool) – if True, notes will be synced.

  • cb (Callable) – function which is called after synchronisation is complete.

  • prune_reminders (bool) – if True, completed reminders are deleted before sync.

message_signal

Log messages are sent to this signal.

alias of str

progress_signal

Progress updates are sent to this signal.

alias of int

run()

Carries out the synchronisation process.

For reminders, if enabled, this involves: 1. Pruning local completed reminders, if enabled. 2. Synchronising deleted reminders. 3. Synchronising reminders. 4. Saving reminders to the database.

For notes, if enabled, this involves: 1. Synchronising deleted notes. 2. Synchronising notes.

Return type:

None