VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
markmorreny at gmail.com Guest
|
Posted: Wed Aug 12, 2009 6:31 am Post subject: [Freeswitch-users] Fwd: Fwd: Scheduler in module |
|
|
Hi,
In my LOAD_FUNCTION, I am trying to have freeswitch to flush out some data every 10 s. The following lines of code does not show any effect at all.
switch_scheduler_task_thread_start();
switch_scheduler_add_task(switch_epoch_time_now(NULL), data_flush_callback, "data_flush","core",0,NULL,SSHF_NONE|SSHF_NO_DEL);
SWITCH_STANDARD_SCHED_FUNC(data_flush_callback) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "starting to flush data buffer...\n");
task->runtime = switch_time_now() + 10;
}
Does anyone know how to get it to work?
Thanks,
Mark
---------- Forwarded message ----------
From: Brian West <brian@freeswitch.org (brian@freeswitch.org)>
Date: Mon, Aug 10, 2009 at 8:53 PM
Subject: Re: [Freeswitch-users] Fwd: Scheduler in module
To: freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)
switch_rtp.c has a simple one for the zrtp cache storing.
/b
On Aug 10, 2009, at 7:13 AM, Michael Jerris wrote:
Quote: | Re schedule is done in your callback, take a look at places that use
these apis in the code for details.
|
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org |
|
Back to top |
|
|
mrene_lists at avgs.ca Guest
|
Posted: Wed Aug 12, 2009 10:16 am Post subject: [Freeswitch-users] Fwd: Fwd: Scheduler in module |
|
|
Hi,
I did the same thing on my side....
API CALL [load(mod_skel)] output:
+OK
2009-08-12 11:08:18.37891 [DEBUG] switch_scheduler.c:214 Added task 2 data_flush (core) to run at 1250089698
2009-08-12 11:08:18.37891 [CONSOLE] switch_loadable_module.c:889 Successfully Loaded [mod_skel]
2009-08-12 11:08:18.37891 [NOTICE] switch_loadable_module.c:270 Adding API Function 'skel'
freeswitch@Maths-Mac.local (freeswitch@Maths-Mac.local)> 2009-08-12 11:08:18.207113 [ERR] mod_skel.c:120 starting to flush data buffer...
Note that you don't need to start the thread manually, the core already has threads running for the scheduler.
Mathieu Rene
Avant-Garde Solutions Inc
Office: + 1 (514) 664-1044 x100
Cell: +1 (514) 664-1044 x200
mrene@avgs.ca (mrene@avgs.ca)
On 12-Aug-09, at 7:26 AM, mark morreny wrote:
Quote: | Hi,
In my LOAD_FUNCTION, I am trying to have freeswitch to flush out some data every 10 s. The following lines of code does not show any effect at all.
switch_scheduler_task_thread_start();
switch_scheduler_add_task(switch_epoch_time_now(NULL), data_flush_callback, "data_flush","core",0,NULL,SSHF_NONE|SSHF_NO_DEL);
SWITCH_STANDARD_SCHED_FUNC(data_flush_callback) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "starting to flush data buffer...\n");
task->runtime = switch_time_now() + 10;
}
Does anyone know how to get it to work?
Thanks,
Mark
---------- Forwarded message ----------
From: Brian West <brian@freeswitch.org (brian@freeswitch.org)>
Date: Mon, Aug 10, 2009 at 8:53 PM
Subject: Re: [Freeswitch-users] Fwd: Scheduler in module
To: freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)
switch_rtp.c has a simple one for the zrtp cache storing.
/b
On Aug 10, 2009, at 7:13 AM, Michael Jerris wrote:
Quote: | Re schedule is done in your callback, take a look at places that use
these apis in the code for details.
|
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
|
|
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|