Revert "MT#7533 stop rate-o-mat service"

changes on heartbeat config makes it to restart on apply.

This reverts commit 6a327ad7f1.
mr3.5
Victor Seva 12 years ago
parent 6a327ad7f1
commit c4e7d63886

@ -95,7 +95,6 @@ else
$yaml->[0]->{kamailio}{proxy}{presence}{enable} = 'yes'; $yaml->[0]->{kamailio}{proxy}{presence}{enable} = 'yes';
$yaml->[0]->{sems}{debug} = 'yes'; $yaml->[0]->{sems}{debug} = 'yes';
$yaml->[0]->{checktools}{sip_check_enable} = 0; $yaml->[0]->{checktools}{sip_check_enable} = 0;
$yaml->[0]->{rateomat}{enable} = 'no';
tie @array, 'Tie::File', '/etc/hosts' or die ('Can set test domain on /etc/hosts'); tie @array, 'Tie::File', '/etc/hosts' or die ('Can set test domain on /etc/hosts');
for (@array) for (@array)

@ -34,10 +34,6 @@ services = [
'collectdmon.pid' 'collectdmon.pid'
] ]
services_stop = [
'rate-o-mat.pid',
]
watched_dirs = [ watched_dirs = [
'/var/run/kamailio', '/var/run/kamailio',
'/var/run/ngcp-sems', '/var/run/ngcp-sems',
@ -53,7 +49,7 @@ class Handler(pyinotify.ProcessEvent):
def check_all(self): def check_all(self):
all = True all = True
for k,v in self.watched.iteritems(): for k,v in self.watched.iteritems():
all = (all and (v['created'] or v['modified'] or v['deleted'])) all = (all and (v['created'] or v['modified']))
print "checking: %s[%s] all:%s" % (k,v, all) print "checking: %s[%s] all:%s" % (k,v, all)
return all return all
@ -73,11 +69,6 @@ class Handler(pyinotify.ProcessEvent):
if watched.has_key(event.pathname): if watched.has_key(event.pathname):
watched[event.pathname]['modified'] = True watched[event.pathname]['modified'] = True
print "modified %s" % event.pathname print "modified %s" % event.pathname
def process_IN_DELETE(self, event):
if watched.has_key(event.pathname+'_del'):
watched[event.pathname+'_del']['deleted'] = True
print "deleted %s" % event.pathname
# for debug # for debug
# def process_default(self, event): # def process_default(self, event):
# if watched.has_key(event.pathname): # if watched.has_key(event.pathname):
@ -91,13 +82,6 @@ for service in services:
print "Watching %s" % service_pid print "Watching %s" % service_pid
watched[service_pid] = {'deleted': False, 'created': False, 'modified': False } watched[service_pid] = {'deleted': False, 'created': False, 'modified': False }
wm.add_watch(service_pid, pyinotify.IN_IGNORED) wm.add_watch(service_pid, pyinotify.IN_IGNORED)
for service in services_stop:
service_pid = os.path.join(base_path, service)
print "Watching %s" % service_pid
watched[service_pid+'_del'] = {'deleted': False, 'created': False, 'modified': False }
wm.add_watch(service_pid, pyinotify.IN_IGNORED)
for d in watched_dirs: for d in watched_dirs:
wm.add_watch(d, pyinotify.ALL_EVENTS) wm.add_watch(d, pyinotify.ALL_EVENTS)

Loading…
Cancel
Save