Modern ERP Reports Application with microservices architecture Tech Stack: - Backend: FastAPI + python-oracledb (Oracle DB integration) - Frontend: Vue.js 3 + PrimeVue + Vite - Telegram Bot: python-telegram-bot + SQLite - Infrastructure: Shared database pool, JWT authentication, SSH tunnel Features: - FastAPI backend with async Oracle connection pool - Vue.js 3 responsive frontend with PrimeVue components - Telegram bot alternative interface - Microservices architecture with shared components - Complete deployment support (Linux Docker + Windows IIS) - Comprehensive testing (Playwright E2E + pytest) Repository Structure: - reports-app/ - Main application (backend, frontend, telegram-bot) - shared/ - Shared components (database pool, auth, utils) - deployment/ - Deployment scripts (Linux & Windows) - docs/ - Project documentation - security/ - Security scanning and git hooks
55 lines
1.5 KiB
PowerShell
55 lines
1.5 KiB
PowerShell
<#
|
|
.SYNOPSIS
|
|
Stop ROA2WEB Telegram Bot Service
|
|
|
|
.DESCRIPTION
|
|
Stops the ROA2WEB Telegram Bot Windows service gracefully.
|
|
|
|
.EXAMPLE
|
|
.\Stop-TelegramBot.ps1
|
|
#>
|
|
|
|
[CmdletBinding()]
|
|
param(
|
|
[string]$ServiceName = "ROA2WEB-TelegramBot",
|
|
[int]$Timeout = 30
|
|
)
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
|
|
Write-Host "`n[*] Stopping ROA2WEB Telegram Bot Service..." -ForegroundColor Cyan
|
|
|
|
try {
|
|
$service = Get-Service -Name $ServiceName -ErrorAction Stop
|
|
|
|
if ($service.Status -eq "Stopped") {
|
|
Write-Host " [OK] Service is already stopped" -ForegroundColor Green
|
|
exit 0
|
|
}
|
|
|
|
# Stop service
|
|
Stop-Service -Name $ServiceName -Force
|
|
Write-Host " [*] Service stop command issued" -ForegroundColor Yellow
|
|
|
|
# Wait for service to stop
|
|
$elapsed = 0
|
|
while ($service.Status -ne "Stopped" -and $elapsed -lt $Timeout) {
|
|
Start-Sleep -Seconds 1
|
|
$service.Refresh()
|
|
$elapsed++
|
|
Write-Host " [*] Waiting for service to stop... ($elapsed/$Timeout)" -ForegroundColor Yellow
|
|
}
|
|
|
|
if ($service.Status -eq "Stopped") {
|
|
Write-Host " [OK] Service stopped successfully" -ForegroundColor Green
|
|
exit 0
|
|
} else {
|
|
Write-Host " [ERROR] Service did not stop within timeout (Status: $($service.Status))" -ForegroundColor Red
|
|
Write-Host " You may need to force kill the process" -ForegroundColor Yellow
|
|
exit 1
|
|
}
|
|
} catch {
|
|
Write-Host " [ERROR] Failed to stop service: $_" -ForegroundColor Red
|
|
exit 1
|
|
}
|