ipol-journal / ipolDevel

IPOL demo system development
GNU Affero General Public License v3.0
23 stars 3 forks source link

[archive] added private routes #168

Closed hmaciasc closed 1 year ago

hmaciasc commented 1 year ago

Added a router for private routes and managed to remove an import this way.

For future notes, middlewares in fastapi are global and affect all routes and a router can't have a middleware, or at least not to my knowledge, hence this solution.

hmaciasc commented 1 year ago

If possible please review the TODOs in the full archive.py file. I could use this PR to remove them if they are not needed. I recall one or two of these endpoints with TODO to be used by scripts outside IPOL or by test only

hmaciasc commented 1 year ago

"# TODO since we now use systemd this method makes no sense anymore": I have a question here: what happens now when systemd asks the module to stop?

I believe systemd kills the process by sending the SIGTERM signal. For now the shutdown is only logging it was shutdown as information.

mcolom commented 1 year ago

"# TODO since we now use systemd this method makes no sense anymore": I have a question here: what happens now when systemd asks the module to stop?

I believe systemd kills the process by sending the SIGTERM signal. For now the shutdown is only logging it was shutdown as information.

If it's a SIGTERM then it's totally fine, thanks!