Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixes rockstor#1689 and add data_collector yum updates skeleton
Ref to rockstor#1619 and rockstor#1689
Fixed a small regression after flake8 rounds plus partially added
data_collector backend for yum updates

Signed-off-by: Mirko Arena <mirko.arena@gmail.com>
  • Loading branch information
MFlyer committed Apr 3, 2017
1 parent 1f927c7 commit d1edcb8
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/rockstor/smart_manager/data_collector.py
Expand Up @@ -362,9 +362,9 @@ def find_rotating_logs(self):
# reading/downloading Build a rotated log list to be sent to client
# for frontend updates
for current_rotated in rotated_logs:
rotated_logfile = path.basename(current_rotated),
rotated_logfile = path.basename(current_rotated)
rotated_logdir = ('%s/' % path.dirname(current_rotated))
rotated_key = rotated_logfile.replace(
rotated_key = rotated_logfile.replace(
self.logs[log_key]['logfile'], log_key)
self.logs.update({rotated_key: {'logfile': rotated_logfile,
'logdir': rotated_logdir}})
Expand Down Expand Up @@ -949,6 +949,18 @@ def yum_updates(self):
})
gevent.sleep(20)

def on_runyum(self, sid):

def launch_yum():

try:
self.aw.api_call('commands/update', data=None, calltype='post',
save_error=False)
except Exception as e:
logger.error('%s. exception: %s'
% (r['error'], e.__str__()))
self.spawn(launch_yum, sid)

def prune_logs(self):

while self.start:
Expand Down

0 comments on commit d1edcb8

Please sign in to comment.