Add expected start/end time columns

This commit is contained in:
emanuele-f 2020-02-21 13:30:37 +01:00
parent d1f11c7de7
commit 53c032f9f6
8 changed files with 99 additions and 18 deletions

View file

@ -122,13 +122,19 @@ static bool ignoreDeadlineExceeded(char *path) {
/* **************************************************** */
bool ThreadPool::queueJob(ThreadedActivity *ta, char *path, NetworkInterface *iface, time_t deadline) {
bool ThreadPool::queueJob(ThreadedActivity *ta, char *path, NetworkInterface *iface, time_t scheduled_time, time_t deadline) {
QueuedThreadData *q;
ThreadedActivityStats *stats = ta->getThreadedActivityStats(iface, true);
if(isTerminating())
return(false);
if(stats) {
stats->clearErrors();
stats->setScheduledTime(scheduled_time);
stats->setDeadline(deadline);
}
if(!ta->isQueueable(iface)) {
if(stats) {
if(ta->get_state(iface) == threaded_activity_state_queued) {
@ -141,9 +147,6 @@ bool ThreadPool::queueJob(ThreadedActivity *ta, char *path, NetworkInterface *if
return(false); /* Task still running or already queued, don't re-queue it */
}
if(stats)
stats->clearErrors();
q = new QueuedThreadData(ta, path, iface, deadline);
if(!q) {