mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Integration - TDB write operations
- TDB::gc rewritten. - TDB::commit fixed. - Corrected usage of handleRecurringTasks wrt TDB. - Unit tests for TDB.
This commit is contained in:
parent
314ce572e1
commit
7ff178cecc
12 changed files with 211 additions and 125 deletions
|
@ -82,6 +82,7 @@ std::string handleAdd ()
|
|||
|
||||
context.tdb.lock (context.config.get ("locking", true));
|
||||
context.tdb.add (context.task);
|
||||
context.tdb.commit ();
|
||||
context.tdb.unlock ();
|
||||
|
||||
return out.str ();
|
||||
|
@ -97,6 +98,8 @@ std::string handleProjects ()
|
|||
std::vector <Task> tasks;
|
||||
context.tdb.lock (context.config.get ("locking", true));
|
||||
int quantity = context.tdb.loadPending (tasks, context.filter);
|
||||
handleRecurrence (tasks);
|
||||
context.tdb.commit ();
|
||||
context.tdb.unlock ();
|
||||
|
||||
// Scan all the tasks for their project name, building a map using project
|
||||
|
@ -154,6 +157,8 @@ std::string handleTags ()
|
|||
std::vector <Task> tasks;
|
||||
context.tdb.lock (context.config.get ("locking", true));
|
||||
int quantity = context.tdb.loadPending (tasks, context.filter);
|
||||
handleRecurrence (tasks);
|
||||
context.tdb.commit ();
|
||||
context.tdb.unlock ();
|
||||
|
||||
// Scan all the tasks for their project name, building a map using project
|
||||
|
@ -663,8 +668,9 @@ std::string handleExport ()
|
|||
std::vector <Task> tasks;
|
||||
context.tdb.lock (context.config.get ("locking", true));
|
||||
context.tdb.loadPending (tasks, context.filter);
|
||||
handleRecurrence (tasks);
|
||||
context.tdb.commit ();
|
||||
context.tdb.unlock ();
|
||||
// TODO handleRecurrence (tdb, tasks);
|
||||
|
||||
foreach (task, tasks)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue