Commit c2eab1a2 authored by deepdey's avatar deepdey

feat: implement sync-redis-web-api-service

parent 4b5f0f87
import sys
import os
# Add parent directory to sys.path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
from app import create_app
def sync_web_api() -> bool:
app = create_app()
status: bool = False
with app.app_context():
from app.routes.web_api.web_api_dao_service import sync_web_api
status = sync_web_api()
return status
if __name__ == '__main__':
sync_web_api()
[Unit]
Description=Sync Redis webApi data with Postgres
After=network.target
Conflicts=getty@tty1.service
[Service]
Type=simple
ExecStart=/usr/bin/python3 /etc/webomagic_user/services/web_api_sync_service.py
Restart=always
[Install]
WantedBy=multi-user.target
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment