Skip to content

Commit

Permalink
version 0.41 alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
robux committed Jun 19, 2015
1 parent ac57164 commit b633d77
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion model/01-base.xml
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@
<base_id desc="Base ID" type="String" section="common" setting="[create_base_id],hex" />
<scheduler_step desc="Scheduler step (sec)" type="Real" section="common" setting="1.0" />
<base_garbage_term desc="Base garbage term (day)" type="Real" section="common" setting="5" />
<base_purge_term desc="Base purge term (day)" type="Real" section="common" setting="15" />
<base_purge_term desc="Base purge term (day)" type="Real" section="common" setting="30" />

<do_on_show desc="Do on show main window" type="Integer" section="view" setting="2" />
<hide_on_minimize desc="Hide on minimize" type="Boolean" section="view" setting="false" />
Expand Down
18 changes: 11 additions & 7 deletions pandora.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13794,9 +13794,11 @@ def update_treeview
row[treeview.param_view_col] = view
end
end
while store.size>sel.size
iter = store.get_iter(Gtk::TreePath.new(store.size-1))
i = sel.size
iter = store.get_iter(Gtk::TreePath.new(i))
while iter
store.remove(iter)
iter = store.get_iter(Gtk::TreePath.new(i))
end
if path or (treeview.sel.size>0)
path ||= Gtk::TreePath.new(treeview.sel.size-1)
Expand Down Expand Up @@ -15569,8 +15571,9 @@ def fill_main_toolbar(toolbar)
# RU: Параметры планировщика (сек)
CheckTaskPeriod = 5*60 #5 min
CheckBasePeriod = 60*60 #60 min
CheckBaseStep = 2 #10 sec
CheckBaseStep = 10 #10 sec
# Size of bundle processed at one cycle
# RU: Размер пачки, обрабатываемой за цикл
HuntTrain = 10 #10 nodes at a heat
BaseGarbTrain = 3 #3 records at a heat

Expand All @@ -15584,8 +15587,9 @@ def init_scheduler(step=nil)
@base_garbage_term = PandoraUtils.get_param('base_garbage_term')
@base_purge_term = PandoraUtils.get_param('base_purge_term')
@base_garbage_term ||= 5 #day
@base_purge_term ||= 15 #day
@base_garbage_term = @base_garbage_term * 24*60*60 #sec
@base_purge_term ||= 30 #day
@base_garbage_term = (@base_garbage_term * 24*60*60).round #sec
@base_purge_term = (@base_purge_term * 24*60*60).round #sec
@shed_models ||= {}
@task_offset = nil
@task_model = nil
Expand Down Expand Up @@ -15718,12 +15722,12 @@ def init_scheduler(step=nil)
@base_garb_id, arch_time]
else # :purge
purge_time = Time.now.to_i - @base_purge_term
filter = ['id>=? AND modified<? AND panstate>=', @base_garb_id, \
filter = ['id>=? AND modified<? AND panstate>=?', @base_garb_id, \
purge_time, PandoraModel::PSF_Deleted]
end
fields = 'id, panstate'
p 'Base garbager [ider,mode,filt]: '+[@base_garb_model.ider, @base_garb_mode, filter].inspect
sel = @base_garb_model.select(filter, false, fields, 'id ASC', train_tail)
p '=====Base Garb [ider,mode]: '+[@base_garb_model.ider, @base_garb_mode].inspect
#p 'base_garb_sel='+sel.inspect
if sel and (sel.size>0)
res ||= []
Expand Down

0 comments on commit b633d77

Please sign in to comment.