diff options
author | dennis <d@ennis.no> | 2023-01-31 20:59:38 +0100 |
---|---|---|
committer | dennis <d@ennis.no> | 2023-01-31 20:59:38 +0100 |
commit | 3499ea624b67559f2c9530db4e36635106e22336 (patch) | |
tree | e2a81e6ed2368df7f538dacd479e3d2b5f4dba8a /queue2pgsql.service | |
parent | handle HAN as well (diff) | |
download | energyscripts-3499ea624b67559f2c9530db4e36635106e22336.tar.gz |
added queue, in case db-connection is down
Diffstat (limited to 'queue2pgsql.service')
-rw-r--r-- | queue2pgsql.service | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/queue2pgsql.service b/queue2pgsql.service new file mode 100644 index 0000000..49e4066 --- /dev/null +++ b/queue2pgsql.service @@ -0,0 +1,17 @@ +[Unit] +Description=Simple service to start python-listener +StartLimitIntervalSec=100 +StartLimitBurst=5 + +[Service] +Type=simple +EnvironmentFile=%h/energyscripts/.env +WorkingDirectory=%h/energyscripts +ExecStart=%h/energyscripts/venv/bin/python3 -u queue2pgsql.py +Restart=on-failure +TimeoutStopSec=70 +RestartSec=30 +SyslogIdentifier=queue2pgsql + +[Install] +WantedBy=default.target |