|
|
@ -26,7 +26,7 @@ sql::Database* init_database(std::string calendar) { |
|
|
|
return db::init(calendar + ".db"); |
|
|
|
} |
|
|
|
|
|
|
|
void update_database(std::string directory, const sql::Database *db) { |
|
|
|
void update_database(std::string directory, sql::Database *db) { |
|
|
|
std::vector<ical::IcalObject*> objects = util::parse_cal_dir(directory); |
|
|
|
for(auto const& obj : objects) { |
|
|
|
if(obj->empty()) continue; |
|
|
@ -34,7 +34,7 @@ void update_database(std::string directory, const sql::Database *db) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
void do_heartbeat(std::string directory, const sql::Database *db) { |
|
|
|
void do_heartbeat(std::string directory, sql::Database *db) { |
|
|
|
util::notify("Updating files from " + directory, ""); |
|
|
|
update_database(directory, db); |
|
|
|
} |
|
|
|