Skip to content

Commit 57d25dd

Browse files
committed
Merge remote-tracking branch 'origin/release/v1.2.2'
2 parents 13653fc + acda5c6 commit 57d25dd

File tree

18 files changed

+48
-38
lines changed

18 files changed

+48
-38
lines changed

README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ There are 2 run profiles (`Development` and `Production`) and 2 possible configs
3838

3939
1. Running on Windows allows to use Net Directory class with network path to files && folders, therefore `SM2201` config section
4040
looks like:
41-
```csharp
41+
```json
4242
"Sm2201SpectraStoreSettings": {
4343
"Address": "192.168.10.212",
4444
"Domain": "MOSSBAUERLAB",
@@ -49,7 +49,7 @@ There are 2 run profiles (`Development` and `Production`) and 2 possible configs
4949

5050
2. Running on any Linux requires to mount Windows shared folder using `cifs.mount`, because `Directory` in Linux doesn't
5151
understand Windows network Path, therefore `SM2201` config section looks like:
52-
```csharp
52+
```json
5353
"Sm2201SpectraStoreSettings": {
5454
"Address": "",
5555
"Domain": "MOSSBAUERLAB",
@@ -94,8 +94,7 @@ To run `Wissance.MossbauerLab.Watcher.Web` as a service it should be configured
9494
1. Create group - `sudo groupadd mossbauer`
9595
2. Create user - `labwatcher - sudo useradd -r -g mossbauer -d /usr/local/sbin/labwatcher -s /sbin/nologin labwatcher`
9696
3. Create labwatcher.service file with following content:
97-
```
98-
97+
```bash
9998
[Unit]
10099
Description=Wissance.MossbauerLab.Watcher service
101100
After=syslog.target network.target
@@ -113,6 +112,15 @@ StandardError=syslog
113112
[Install]
114113
WantedBy=multi-user.target
115114

115+
```
116+
Recently, we Started to build **self-contained archive into single file** except `.pdb`(debug symbols) and configs, in this
117+
case after copy published file `Wissance.MossbauerLab.Watcher.Web` must be made executable `+x` (via `chmod`):
118+
```bash
119+
sudo -u labwatcher chmod +x Wissance.MossbauerLab.Watcher.Web
120+
````
121+
after that change ExecStart in service file like this:
122+
```bash
123+
ExecStart=/usr/local/sbin/labwatcher/app/Wissance.MossbauerLab.Watcher.Web --environment=Production
116124
```
117125
4. Change directory owner to `mossbauer:labwatcher` - `sudo chown -R labwatcher:mossbauer /usr/local/sbin/labwatcher`
118126
5. Copy `labwatcher.service` file to `/etc/systemd/system`

Wissance.MossbauerLab.Watcher/Wissance.MossbauerLab.Watcher.Data/Entities/EventEntity.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public EventEntity(EventType eventType, DateTime start, DateTime? finish)
2525
Finish = finish;
2626
}
2727

28-
public int Id { get; }
28+
public int Id { get; set; }
2929
public EventType Type { get; set; }
3030
public DateTime Start { get; set; }
3131
public DateTime? Finish { get; set; }

Wissance.MossbauerLab.Watcher/Wissance.MossbauerLab.Watcher.Data/Entities/SpectrumEntity.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public SpectrumEntity(string name, string description, string location, DateTime
2222
IsArchived = isArchived;
2323
}
2424

25-
public int Id { get; }
25+
public int Id { get; set; }
2626
public string Name { get; set; }
2727
public string Description { get; set; }
2828
public string Location { get; set; }

Wissance.MossbauerLab.Watcher/Wissance.MossbauerLab.Watcher.Data/Tools/MigrationsContextDbFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using Microsoft.EntityFrameworkCore;
55
using Microsoft.EntityFrameworkCore.Design;
66
using Microsoft.EntityFrameworkCore.Sqlite;
7-
using Wissance.WebApiToolkit.Data.Tools;
7+
using Wissance.WebApiToolkit.Data.Ef.Tools;
88

99
namespace Wissance.MossbauerLab.Watcher.Data.Tools
1010
{

Wissance.MossbauerLab.Watcher/Wissance.MossbauerLab.Watcher.Data/Wissance.MossbauerLab.Watcher.Data.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
<PrivateAssets>all</PrivateAssets>
1313
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1414
</PackageReference>
15-
<PackageReference Include="Wissance.WebApiToolkit" Version="1.1.2" />
15+
<PackageReference Include="Wissance.WebApiToolkit.Core" Version="4.1.0" />
16+
<PackageReference Include="Wissance.WebApiToolkit.Data.Ef" Version="4.1.0" />
1617
</ItemGroup>
1718

1819
<ItemGroup>

Wissance.MossbauerLab.Watcher/Wissance.MossabuerLab.Watcher.Dto/SpectrumInfoDto.cs renamed to Wissance.MossbauerLab.Watcher/Wissance.MossbauerLab.Watcher.Dto/SpectrumInfoDto.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using System.Collections.Generic;
33
using System.Text;
44

5-
namespace Wissance.MossabuerLab.Watcher.Dto
5+
namespace Wissance.MossbauerLab.Watcher.Dto
66
{
77
public class SpectrumInfoDto
88
{

Wissance.MossbauerLab.Watcher/Wissance.MossabuerLab.Watcher.Dto/SpectrumSamplesInfoDto.cs renamed to Wissance.MossbauerLab.Watcher/Wissance.MossbauerLab.Watcher.Dto/SpectrumSamplesInfoDto.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using System.Collections.Generic;
33
using System.Text;
44

5-
namespace Wissance.MossabuerLab.Watcher.Dto
5+
namespace Wissance.MossbauerLab.Watcher.Dto
66
{
77
public class SpectrumSamplesInfoDto
88
{

Wissance.MossbauerLab.Watcher/Wissance.MossabuerLab.Watcher.Dto/Wissance.MossabuerLab.Watcher.Dto.csproj renamed to Wissance.MossbauerLab.Watcher/Wissance.MossbauerLab.Watcher.Dto/Wissance.MossbauerLab.Watcher.Dto.csproj

File renamed without changes.

Wissance.MossbauerLab.Watcher/Wissance.MossbauerLab.Watcher.Services/Notification/TelegramNotifier.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ private Message CreateMessageFromTemplate(IList<SpectrumReadyData> spectra)
5353
if (!_templateManager.Templates.ContainsKey(SpectrometerEvent.SpectrumSaved))
5454
throw new InvalidDataException("Expected that key \"SpectrometerEvent.SpectrumSaved\" present in _templates, actually not");
5555
string template;
56-
bool spectraIsEmpty = !spectra.Any();
57-
if (spectraIsEmpty)
56+
if (spectra.Any())
5857
{
5958
template = _templateManager.Templates[SpectrometerEvent.SpectrumSaved].PositiveCase;
6059
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
�� {currDate} �� ���� �������� �� ������ �������, �������� ��� ����� �������� �� ����� �� ��������� �������:
2-
* ��������, ��� ���������� ����������� � ������������ � ������ ������ �� ����������;
3-
* ���� ������ ������������������� ������������ / ���������� ������������ ����������;
4-
* ���������� ���������� �������������� ����������� ����� ������ ������� �� ��� ;
5-
* ���������� ���� (���������� �������/��������� ���� ��������)
1+
На {currDate} не было получено ни одного спектра, косвенно это может говорить об одной из следующих проблем:
2+
* возможно, что накопление остановлено и эксперименты в данный момент не проводятся;
3+
* сбой работы спектрометрического оборудования / отключение управляющего компьютера;
4+
* длительное отключение электроэнергии превышающее время работы системы от АКБ ;
5+
* отсутствие сети (отключение роутера/мобильной сети интернет)

0 commit comments

Comments
 (0)