mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-16 08:49:01 +00:00
update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5141 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
1cb336eaf0
commit
fc85172efd
@ -76,7 +76,7 @@ static void heartbeat_callback(switch_scheduler_task_t *task)
|
|||||||
send_heartbeat();
|
send_heartbeat();
|
||||||
|
|
||||||
/* reschedule this task */
|
/* reschedule this task */
|
||||||
task->runtime += 20;
|
task->runtime = time(NULL) + 20;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -77,6 +77,11 @@ static int task_thread_loop(int done)
|
|||||||
} else {
|
} else {
|
||||||
int64_t now = time(NULL);
|
int64_t now = time(NULL);
|
||||||
if (now >= tp->task.runtime && !tp->in_thread) {
|
if (now >= tp->task.runtime && !tp->in_thread) {
|
||||||
|
int32_t diff = now - tp->task.runtime;
|
||||||
|
if (diff > 1) {
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Task was executed late by %d seconds %u %s (%s)\n",
|
||||||
|
diff, tp->task.task_id, tp->desc, switch_str_nil(tp->task.group));
|
||||||
|
}
|
||||||
tp->executed = now;
|
tp->executed = now;
|
||||||
if (switch_test_flag(tp, SSHF_OWN_THREAD)) {
|
if (switch_test_flag(tp, SSHF_OWN_THREAD)) {
|
||||||
switch_thread_t *thread;
|
switch_thread_t *thread;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user