sphinx-compatible docstrings

This commit is contained in:
niphlod committed 2014-03-12 22:03:42 +01:00
1 parent eb435e785c
commit e209dcc8d3
5 files changed
+86 -82

No files matched your search

+10 -7
View File
@@ -2,8 +2,12 @@
# -*- coding: utf-8 -*-
"""
Created by Attila Csipa <web2py@csipa.in.rs>
Modified by Massimo Di Pierro <mdipierro@cs.depaul.edu>
| This file is part of the web2py Web Framework
| Created by Attila Csipa <web2py@csipa.in.rs>
| Modified by Massimo Di Pierro <mdipierro@cs.depaul.edu>
| License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
Cron-style interface
"""
import sys
@@ -27,7 +31,7 @@ _cron_subprocs = []
def absolute_path_link(path):
"""
Return an absolute path for the destination of a symlink
Returns an absolute path for the destination of a symlink
"""
if os.path.islink(path):
@@ -40,7 +44,7 @@ def absolute_path_link(path):
def stopcron():
"graceful shutdown of cron"
"Graceful shutdown of cron"
global _cron_stopping
_cron_stopping = True
while _cron_subprocs:
@@ -107,7 +111,7 @@ class Token(object):
def acquire(self, startup=False):
"""
returns the time when the lock is acquired or
Returns the time when the lock is acquired or
None if cron already running
lock is implemented by writing a pickle (start, stop) in cron.master
@@ -150,8 +154,7 @@ class Token(object):
def release(self):
"""
this function writes into cron.master the time when cron job
was completed
Writes into cron.master the time when cron job was completed
"""
if not self.master.closed:
portalocker.lock(self.master, portalocker.LOCK_EX)