Modified cluster
This commit is contained in:
parent
02d378dedf
commit
c1e50126c9
3 changed files with 8 additions and 7 deletions
|
@ -4,8 +4,9 @@ library angel.cluster;
|
||||||
|
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'common.dart';
|
import 'common.dart';
|
||||||
|
import 'dart:isolate';
|
||||||
|
|
||||||
main() async {
|
main(args, SendPort sendPort) async {
|
||||||
runZoned(startServer(clustered: true), onError: onError);
|
runZoned(startServer(args, clustered: true, sendPort: sendPort),
|
||||||
|
onError: onError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,8 @@ import 'package:angel/angel.dart';
|
||||||
import 'package:angel_diagnostics/angel_diagnostics.dart';
|
import 'package:angel_diagnostics/angel_diagnostics.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
|
|
||||||
startServer({bool clustered: false}) {
|
startServer(args, {bool clustered: false, SendPort sendPort}) {
|
||||||
return (args, [SendPort sendPort]) async {
|
return () async {
|
||||||
var app = await createServer();
|
var app = await createServer();
|
||||||
var dateFormat = new DateFormat("y-MM-dd");
|
var dateFormat = new DateFormat("y-MM-dd");
|
||||||
var logFile = new File("logs/${dateFormat.format(new DateTime.now())}.txt");
|
var logFile = new File("logs/${dateFormat.format(new DateTime.now())}.txt");
|
||||||
|
|
|
@ -2,6 +2,6 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'common.dart';
|
import 'common.dart';
|
||||||
|
|
||||||
main() async {
|
main(args) async {
|
||||||
runZoned(startServer(), onError: onError);
|
runZoned(startServer(args), onError: onError);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue