Skip to content

Commit

Permalink
HTTPListener: use "age_sece" not "started_on" in _active_tasks
Browse files Browse the repository at this point in the history
For EdgeServer
  • Loading branch information
snej committed Dec 20, 2024
1 parent 56edb04 commit 674112b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion REST/HTTPListener.cc
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,8 @@ namespace litecore::REST {
void HTTPListener::Task::bumpTimeUpdated() { _timeUpdated = ::time(nullptr); }

void HTTPListener::Task::writeDescription(JSONEncoder& json) {
json.writeFormatted("task_id: %u, started_on: %lu", _taskID, _timeStarted.load());
unsigned long age = ::time(nullptr) - _timeStarted;
json.writeFormatted("task_id: %u, age_secs: %lu", _taskID, age);
}

unsigned HTTPListener::registerTask(Task* task) {
Expand Down

0 comments on commit 674112b

Please sign in to comment.