This commit is contained in:
zakhy 2024-10-21 12:50:02 +07:00
parent f5d8ea6a89
commit f26b1f419a
3 changed files with 7 additions and 1 deletions

View File

@ -22,6 +22,10 @@ RUN pip install --no-cache /wheels/* && rm -rf /wheels
# copy project
COPY . $APP_HOME
RUN mkdir $APP_HOME/log
RUN mkdir $APP_HOME/log/error/
RUN mkdir $APP_HOME/log/log/
RUN mkdir $APP_HOME/log/mesage/
# create the app user
RUN addgroup --system app && adduser --system --group app && \

View File

@ -204,6 +204,8 @@ def create_scales_control_data():
def write_scale_control_data_to_redis():
try:
data = PostgresScales.get_scales_data(300)
if not data:
return 'No data'
with RedisService(host=REDIS_HOST, port=REDIS_PORT, db=1) as redis_service:
for row in data:
redis_service.hset_value(row[0], key='Value', value=str(row[1]))

View File

@ -14,7 +14,7 @@ urlpatterns = [
path('main/', include('apps.main.urls')),
path('montorem/', include('apps.montorem.urls')),
path('accounts/logout/', views.user_logout, name='user_logout'),
path('accounts/', views.user_login, name='user_login'),
path('accounts/login/', views.user_login, name='user_login'),
path('admin/', admin.site.urls),
path('current_time/', return_current_time, name='current_time')
]