the autosave plugin: doc bug? how to enable and configure

18 views
Skip to first unread message

Terrence Brannon

unread,
Dec 6, 2019, 3:43:12 PM12/6/19
to leo-editor
The autosave plugin says that it saves every 300 seconds by default. But the .getInt() call in the code does not have a default value. So I doubt that it really saves every 300 seconds by default.

Next, I'm not sure where to put the settings for this plugin versus where to put the @enabled-plugins node. I am pasting my Leo graph which has both the settings and @enabled-plugins node and request someone to RSVP as to whether I have done it correctly:

<?xml version="1.0" encoding="utf-8"?>
<!-- Created by Leo: http://leoeditor.com/leo_toc.html -->
<leo_header file_format="2"/>
<globals/>
<preferences/>
<find_panel_settings/>
<vnodes>
<v t="metaperl.20191205100126.2"><vh>@settings</vh>
<v t="metaperl.20191206114047.1"><vh>@enabled-plugins</vh></v>
</v>
<v t="metaperl.20191205101203.1"><vh>ConnectorRegistry</vh></v>
<v t="metaperl.20191206113500.1"><vh>base connector</vh>
<v t="metaperl.20191206112831.1"><vh>model classes</vh>
<v t="metaperl.20191206112619.1"><vh>class BaseDatasource(AuditMixinNullable, ImportMixin)</vh></v>
<v t="metaperl.20191206112632.1"><vh>class BaseColumn(AuditMixinNullable, ImportMixin)</vh></v>
<v t="metaperl.20191206112642.1"><vh>class BaseMetric(AuditMixinNullable, ImportMixin)</vh></v>
</v>
<v t="metaperl.20191206113544.1"><vh>view classes</vh>
<v t="metaperl.20191206113806.1"><vh>class DatasourceModelView(SupersetModelView)</vh></v>
</v>
</v>
</vnodes>
<tnodes>
<t tx="metaperl.20191205100126.2">@int mod_autosave_interval = 30

bool mod_autosave_active = True</t>
<t tx="metaperl.20191205101203.1">class ConnectorRegistry(object):
    """ Central Registry for all available datasource engines"""</t>
<t tx="metaperl.20191206112619.1"></t>
<t tx="metaperl.20191206112632.1"></t>
<t tx="metaperl.20191206112642.1"></t>
<t tx="metaperl.20191206112831.1"></t>
<t tx="metaperl.20191206113500.1"></t>
<t tx="metaperl.20191206113544.1"></t>
<t tx="metaperl.20191206113806.1"></t>
<t tx="metaperl.20191206114047.1">mod_autosave.py</t>
</tnodes>
</leo_file>

Edward K. Ream

unread,
Dec 6, 2019, 4:12:12 PM12/6/19
to leo-editor
On Fri, Dec 6, 2019 at 2:43 PM 'Terrence Brannon' via leo-editor <leo-e...@googlegroups.com> wrote:

The autosave plugin says that it saves every 300 seconds by default. But the .getInt() call in the code does not have a default value. So I doubt that it really saves every 300 seconds by default.

leoSettings.leo contains @int mod-autosave-interval = 300, so the default is indeed 300.

To customize, make sure @bool mod-autosave-active = True (in your myLeoSettings.leo) and set the interval as you like, again in your myLeoSettings.leo.

Edward
Reply all
Reply to author
Forward
0 new messages