Did I find the right examples for you? yes no

All Samples(0)  |  Call(0)  |  Derive(0)  |  Import(0)

src/d/r/droned-HEAD/droned/droned-daemon.py   droned(Download)
owndir(config.DRONED_USER, config.DRONED_HOMEDIR)
owndir(config.DRONED_USER, config.DRONED_WEBROOT)
owndir(config.DRONED_USER, config.JOURNAL_DIR)
if drone.DAEMONIZED:
    owndir(config.DRONED_USER, config.LOG_DIR)

src/d/r/droned-HEAD/droned/services/journal.py   droned(Download)
def list_snapshots():
    return [ name[:-len(SUFFIX)] for name in os.listdir(config.JOURNAL_DIR) \
            if name.endswith(SUFFIX) ]
 
# allow reapable entities a moment to be rebound
def load():
    global temporary_storage
    snapshots = sorted( map(int, list_snapshots()) )
    if not snapshots: return
    path = os.path.join(config.JOURNAL_DIR, str(snapshots[-1]) + SUFFIX)
    def blocking_journal_write(self):
        if not self._task.running: return #account for lazy task start
        now = int( time.time() )
        snapshot = '%d.pickle' % now
        path = os.path.join(config.JOURNAL_DIR, snapshot)
        old = sorted( map(int, list_snapshots()) )[:-config.JOURNAL_RETENTION]
        for timestamp in old:
            path = os.path.join(config.JOURNAL_DIR, str(timestamp) + SUFFIX)
            os.unlink(path)