update
This commit is contained in:
@@ -250,16 +250,16 @@
|
||||
{% macro setting_global_scheduler_button(is_include, is_running, id='scheduler', left='스케쥴링 작동', desc=['On : 스케쥴링 시작','Off : 스케쥴링 중지']) %}
|
||||
{{ setting_top(left) }}
|
||||
<div class="input-group col-sm-3">
|
||||
{% if is_include == 'True' %}
|
||||
{% if is_include == True %}
|
||||
<input id="globalSchedulerSwitchBtn" name="globalSchedulerSwitchBtn" class="form-control form-control-sm" type="checkbox" data-toggle="toggle" checked>
|
||||
{% else %}
|
||||
<input id="globalSchedulerSwitchBtn" name="globalSchedulerSwitchBtn" class="form-control form-control-sm" type="checkbox" data-toggle="toggle">
|
||||
{% endif %}
|
||||
{% if is_running == 'True' %}
|
||||
<span style="padding-left:10px; padding-top: 8px;">동작중</span>
|
||||
{% if is_running == True %}
|
||||
<span style="padding-left:10px; padding-top: 8px; font-weight: bold;">실행중</span>
|
||||
{% else %}
|
||||
{% if is_include == 'True' %}
|
||||
<span style="padding-left:10px; padding-top: 8px;">대기중</span>
|
||||
{% if is_include == True %}
|
||||
<span style="padding-left:10px; padding-top: 8px; ">대기중</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
@@ -100,8 +100,8 @@ class ModelBase(F.db.Model):
|
||||
ago = now - timedelta(days=int(days))
|
||||
#ago.hour = 0
|
||||
#ago.minute = 0
|
||||
ret = F.db.session.query(cls).filter(cls.created_time > ago).delete()
|
||||
cls.P.debug(ret)
|
||||
count = F.db.session.query(cls).filter(cls.created_time > ago).delete()
|
||||
cls.P.logger.info(f"delete_all {days=} {count=}")
|
||||
return True
|
||||
except Exception as e:
|
||||
cls.P.logger.error(f'Exception:{str(e)}')
|
||||
|
||||
Reference in New Issue
Block a user