Wraps the manual steps we kept redoing after every schema/service
change: sync each terminal's Shared Projects copy via git, compile the
service, and drop config/services.ini into place.
Per-terminal headless MetaEditor compilation proved unreliable in
testing - it can exit 0 without producing a log or touching the .ex5,
seemingly needing an interactive desktop session. The script compiles
once against the repo's own working tree instead and copies the
resulting .ex5 to the other terminals, verifying success by checking
the file's mtime actually changed rather than trusting the exit code.
The bare except was hiding a real bug: the deployed service's states
table predated the company/holder_name columns, so every read raised
sqlite3.OperationalError: no such column: s.company. Since it was
caught silently, the UI just stuck on "starting" forever with no
indication why. Now the error text is printed so schema drift like
this is visible immediately instead of requiring manual DB inspection.
Path()'s example kwarg is deprecated in favor of examples (list) in
the installed FastAPI version. Separately, the installed Starlette
(1.3.1) removed the old TemplateResponse(name, context) calling
convention entirely, requiring request as the first positional
argument instead of a 'request' key in the context dict - the old
form crashed index() with "unhashable type: dict" from get_template().
Add static/services.ini as a reference example, and update both the
article draft and working notes with the discovery: placing this file
in the terminal installation's config folder auto-registers the
compiled service, removing the manual Navigator step. Note explicitly
that the file is undocumented (UTF-16LE, absent from the official
config file listing) and likely the terminal's own internal
serialization of Navigator-added services.
Add a section explaining services as an MQL5 program type (single
OnStart handler, no chart binding, per-instance thread, survives
account switches) and a section on the stop grace period, tying the
documented 3-second IsStopped() timeout to the service's jittered
Sleep(). Cite official docs for DatabaseBind indexing, transaction
speedup, and DATABASE_OPEN_COMMON; add a references section.
Код для /create пока тоже просто игнорируем, дойдем до него в пятой части цикла
Код в 56-58 main.py убираем, так как эта информация будет получена главной страницей через ajax-запросы
Формат времени везде сделаем в секундах, нам не нужна милисекундная точность