mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
TDB
- Integration TDB2 into the initialization process. It begins...
This commit is contained in:
parent
10b97fc967
commit
a16b8366cd
3 changed files with 14 additions and 2 deletions
|
@ -141,8 +141,9 @@ int Context::initialize (int argc, const char** argv)
|
||||||
locale = locale.substr (0, period);
|
locale = locale.substr (0, period);
|
||||||
|
|
||||||
// Initialize the database.
|
// Initialize the database.
|
||||||
tdb.clear ();
|
tdb.clear (); // TODO Obsolete
|
||||||
tdb.location (data_dir);
|
tdb.location (data_dir); // TODO Obsolete
|
||||||
|
tdb2.set_location (data_dir);
|
||||||
|
|
||||||
// Hook system init, plus post-start event occurring at the first possible
|
// Hook system init, plus post-start event occurring at the first possible
|
||||||
// moment after hook initialization.
|
// moment after hook initialization.
|
||||||
|
@ -256,7 +257,10 @@ int Context::dispatch (std::string &out)
|
||||||
|
|
||||||
// GC is invoked prior to running any command that displays task IDs.
|
// GC is invoked prior to running any command that displays task IDs.
|
||||||
if (c->displays_id ())
|
if (c->displays_id ())
|
||||||
|
{
|
||||||
tdb.gc ();
|
tdb.gc ();
|
||||||
|
tdb2.gc ();
|
||||||
|
}
|
||||||
|
|
||||||
args.dump ("Argument Categorization");
|
args.dump ("Argument Categorization");
|
||||||
return c->execute (out);
|
return c->execute (out);
|
||||||
|
|
|
@ -266,6 +266,13 @@ void TDB2::commit ()
|
||||||
synch_key.commit ();
|
synch_key.commit ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
int TDB2::gc ()
|
||||||
|
{
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
|
|
@ -85,6 +85,7 @@ public:
|
||||||
void add (const Task&);
|
void add (const Task&);
|
||||||
void modify (const Task&);
|
void modify (const Task&);
|
||||||
void commit ();
|
void commit ();
|
||||||
|
int gc ();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TF2 pending;
|
TF2 pending;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue