make better visible if timer work

This commit is contained in:
einhornimmond 2021-02-02 12:25:40 +01:00 committed by Ulf Gebhardt
parent 53e8249d4d
commit 1c01594ef5
No known key found for this signature in database
GPG Key ID: 81308EFE29ABFEBD
2 changed files with 6 additions and 1 deletions

View File

@ -145,7 +145,9 @@ namespace controller {
}
void PendingTask::calledFromTimer(Poco::Timer& timer)
{
printf("[PendingTask::calledFromTimer]\n");
Poco::DateTime now;
std::string now_string = Poco::DateTimeFormatter::format(now, "%f.%m.%Y %H:%M:%S");
printf("[PendingTask::calledFromTimer] now: %s\n", now_string.data());
Poco::ScopedLock<Poco::Mutex> _lock(mWorkMutex);
auto result = run();
printf("run result: %d\n", result);

View File

@ -581,6 +581,9 @@ namespace model {
// TODO: later check, but now I haven't any way to communicate with the gradido node
mTransactionBody->getTransactionBase()->transactionAccepted(getUser());
// trigger community server update in 5 seconds
Poco::DateTime now;
std::string now_string = Poco::DateTimeFormatter::format(now, "%f.%m.%Y %H:%M:%S");
printf("[%s] trigger community server update in 5 second, now: %s\n", function_name, now_string.data());
CronManager::getInstance()->scheduleUpdateRun(Poco::Timespan(5000, 0));
return 1;
}