Commit Graph

5 Commits

Author SHA1 Message Date
Liubov Dmitrieva
f14c984f62 scm_daemon fix broken build
Summary:
std::process::id is stable feature but not for old compilers

https://doc.rust-lang.org/std/process/fn.id.html

hopefully we will revert this diff soon

Reviewed By: markbt

Differential Revision: D8332282

fbshipit-source-id: cd6ed573a7bd1294ac666f267b09a2121c386a34
2018-06-08 07:52:01 -07:00
Liubov Dmitrieva
2d82868f9f scm daemon, write pid file (to be used for restart after log rotation)
Summary: write pid file

Reviewed By: markbt

Differential Revision: D8331445

fbshipit-source-id: 47492ffc9cc87a2ef228ce9581873dec6e01e369
2018-06-08 06:31:10 -07:00
Liubov Dmitrieva
ae7ece9cd5 scm daemon: refactoring
Summary:
just refactoring to improve the code quality

the main improvement is that I separated TcpReceiver to a different service,
any other services can register callbacks with TcpReceiver service.

For WorkspaceSubscriberService callbacks are implemented using mpsc channel to notify the main WorkspaceSubscriberService thread and single atomic flag that allows running subscriptions to join.

Another improvement is that I added logic to run cloud sync on the first keep alive after connection errors

Reviewed By: markbt

Differential Revision: D8226109

fbshipit-source-id: 3fe513da9273b28b2262948ecdf620821e7ab313
2018-06-05 07:11:55 -07:00
Liubov Dmitrieva
12796cbac0 code fixes to support Rust < 1.26
Summary: This changes to support Scm Daemon on dev machines

Reviewed By: farnz

Differential Revision: D8139892

fbshipit-source-id: b6df53d6ce6615d24822b739d4d1705e0f572660
2018-05-24 12:19:55 -07:00
Liubov Dmitrieva
39ccc28933 Scm Daemon initial implementation
Summary: Scm Daemon initial implementation that currently just listen to Commit Cloud Live Notifications and trigger `hg cloud sync` on notifications

Reviewed By: markbt

Differential Revision: D8119768

fbshipit-source-id: a0d86624fe4b81b3adc89990640916d3da279b8c
2018-05-24 12:19:55 -07:00