use INIT_SCHEDULE_ENTRY_EX1 for new thread

pull/687/head
YuQing 2023-12-29 10:21:41 +08:00
parent de36a81893
commit 030520cb3a
2 changed files with 6 additions and 8 deletions

View File

@ -492,9 +492,9 @@ static int setup_schedule_tasks()
if (g_compress_binlog)
{
INIT_SCHEDULE_ENTRY_EX(scheduleEntries[scheduleArray.count],
INIT_SCHEDULE_ENTRY_EX1(scheduleEntries[scheduleArray.count],
sched_generate_next_id(), g_compress_binlog_time,
24 * 3600, fdfs_binlog_compress_func, NULL);
24 * 3600, fdfs_binlog_compress_func, NULL, true);
scheduleArray.count++;
}

View File

@ -1236,21 +1236,19 @@ static int do_set_trunk_server_myself(ConnectionInfo *pTrackerServer)
if (g_trunk_create_file_advance &&
g_trunk_create_file_interval > 0)
{
INIT_SCHEDULE_ENTRY_EX(*entry, TRUNK_FILE_CREATOR_TASK_ID,
INIT_SCHEDULE_ENTRY_EX1(*entry, TRUNK_FILE_CREATOR_TASK_ID,
g_trunk_create_file_time_base,
g_trunk_create_file_interval,
trunk_create_trunk_file_advance, NULL);
entry->new_thread = true;
trunk_create_trunk_file_advance, NULL, true);
entry++;
}
if (g_trunk_compress_binlog_interval > 0)
{
INIT_SCHEDULE_ENTRY_EX(*entry, TRUNK_BINLOG_COMPRESS_TASK_ID,
INIT_SCHEDULE_ENTRY_EX1(*entry, TRUNK_BINLOG_COMPRESS_TASK_ID,
g_trunk_compress_binlog_time_base,
g_trunk_compress_binlog_interval,
trunk_binlog_compress_func, NULL);
entry->new_thread = true;
trunk_binlog_compress_func, NULL, true);
entry++;
}